The sequence of events described here is an example that focuses on a Juggler activating at a particular time. The Juggler has one input, a Source, and one output, a Sink. In this case the Source is a PIM input agent. The Sink in this example could be another Juggler (with no schedule) or a DIM output agent. If the output was a Juggler that had its own activation schedule the "put product" based messages would be different.In this simplified example, the executive (the Exec class with its helpers) initiates events at the activation time for a certain Juggler. It activates the Juggler which detects that it has one or more inputs. If there are multiple inputs they must be tasked to get their product. However, multiple input products must be merged into one product for input to the Juggler. This merging if required is performed by the Set Finisher. The Set Finisher is also responsible for waiting for all the inputs to complete before sending the final product to the Juggler.
Once the Set Finisher is created and given the set of inputs that need to be tasked, the Jugglers Dispatcher is given the Set Finisher so that it can queue the individual PIM "get" tasks. Typical PIMs execute from a fixed set of PIM execution threads. When a thread is available it is given a new PIM with a task to perform. The PIM receives the task (a "get" task) from the thread and does its work within that thread.
The PIM which is the Source in the drawing above does whatever it needs to do to get a new input product, parse, and format into a standard PAM Product. It "pushes" the product by calling the putProduct() method of the tasking entity which in this case is the Set Finisher. Had there been other inputs the Set Finisher would merge this Product with the others. For example purposes, assume that this was the last (or one and only) Source PIM. When the last Source does its putProduct to the Set Finisher the Set Finisher detects this and after building the composite product, it calls the putProduct() of the entity that tasked it - the Juggler.
Since the Juggler was activated by the executive it knows that it must push its product to all outputs. A Juggler with an output to a second Juggler might be activated by the second Juggler. In that case the first Jugglers output does not go to all outputs - but only to the second juggler.
In the example shown above there is only one DIM. The DIM is queued via a dispatcher onto the DIM queue. When a DIM thread is available the DIM is asked to perform its output task. When the DIM completes the Set Finisher notes that all outstanding DIMs have completed and informs the Juggler that all is done. The Juggler then computes its next activation time and infoms the executive that it has a new activation time.
The sequence of events described above are for a selected example for PAM 2.0.41. The key aspects of the signalling are the notion of activation to "awaken" agents and a uniform method putProduct(Product) on all data Sinks. Further concepts are built into the framework to support future performance enhancements. While there exists only one Dispatcher in the system, future PAM versions may have specialized dispatchers to more efficiently handle certain classes of data or agents.
Revised: 11 January 1999