Group-Oriented Events

Group-oriented events are distributed to an associated collection of agents without filtering. Events posted to the group are effectively broadcast to the members of the group. Typically, agents may use group-oriented events to communicate with other agents launched by the same application. As an example, an agent may inform other agents within the same application when it catches an exception.

The Agent Group paradigm discussed earlier manages group-oriented events. Events can be sent to a group of associated agents by sending them to an AgentGroup to which they belong. The AgentGroup forwards any events it receives to all agents in the group. The events are forwarded to each agent at its correct location, even if it has traveled to another host after joining the group. Also, if an agent is intransit when an event is sent to the group, the event is automatically queued and later flushed after the agent arrives at its new destination. Hence, no group-oriented events are lost when agents travel.

Next we will extend the collaborating database example to utilize group-oriented events.