For instance, an Agent X receives an event E, fires a rule R1 that creates a concept C1. An agent Z receives an event E2, fires a rule R2 that joins concept C1 and event E2.
Scorecards are not shared between agents. (This is true in all OM types.) Each inference agent maintains its own set of scorecards and the values in each agent can differ. This enables scorecards to be used for local purposes and minimizes contention between the agents.
As an analogy consider a bank ATM scenario. Money can be drawn from the same account using different ATMs. However, each ATM maintains a "scorecard" indicating only how much money it dispenses.
An agent key property (Agent.AgentClassName.key) is available for tracking scorecards. It identifies an agent uniquely so that its scorecard can be restored from the cache.
In a load balanced group of agents, events (messages) received by an agent are owned by that agent. Even when the event is retrieved from cache (for example for a join condition), the ownership is maintained. No other agent can work with that event, unless the owning agent fails.
In the event of engine failure, cache cluster services provide for reassignment of ownership of clustered events to other agents in the same agent group, so there is no single point of failure. (Of course, if the event’s time-to-live period expires during this transition, the event expires and is not reassigned.)
Events received from a queue are each taken up by one agent or another. For example, when an agent X receives an Event E1 from a queue, agent B in the same agent group does not see the event. To set up load balancing of events arriving from a queue, you enable the same destination in the agents you want to use. Agents used for load balancing are generally agents in the same group (class) but don’t have to be.
Unlike messages received from a queue, messages sent on a topic are received by all agents that actively listen to the topic. Each agent generates its own event instance (with its own ID) when receiving the message. While it could be useful for multiple agents to receive events sent on a topic, this often leads to undesirable results. Care must be taken to ensure that just one agent receives topic-based messages.
State machines can be configured to have state timeouts. The agents in the cluster collaborate to take ownership of management of the state machines, thereby providing automatic fault tolerance. (Requires TIBCO BusinessEvents Data Modeling add-on software.)
Note that the event E1 is in the cache, but Agent A2 does not load the event in its Rete network. However, if the node (JVM) containing Agent A1 fails, then Agent A2 moves the pending events to its Rete network.