Chapter 17 Understanding Cache OM and Multi-Engine Features : Distributed Cache and Multi-Engine Architecture and Terms

Distributed Cache and Multi-Engine Architecture and Terms
The drawing below illustrates the architecture introduced in Cache Object Management and Multi-Engine Feature Overview and provides more detail.
The drawing shows two agent groups, each with a load balanced pair of agents and an inactive agent for fault tolerance of the engine processes.
Also see Inference Agent Runtime Architecture.
Figure 15 Cache Object Management and Fault Tolerance Architecture
Different BusinessEvents nodes and agents within the nodes have specialized roles in a Cache OM architecture. Sections below explain these terms.
Cache Clusters
A cache cluster is a logical entity that provides the following services:
Fault Tolerance (of data): Notifications to inference agents so that the state of each agent’s working memory remains synchronized with the others, so any agent in the cluster can take over in event of node failure.
Members of a cache cluster are defined at the node level. Any and all agents deployed to those nodes participate in the cluster, according to their function.
Cache Cluster Nodes
A cache cluster node is a physical entity. It is an instance of a Java virtual machine (JVM) hosting one or more BusinessEvents agents.
To define the members of a cache cluster you configure a few properties in each cluster node’s engine property file. See Configure the Cache Cluster Discovery Settings.
A node can be configured to contain inference agents, or query agents, or both. When a node is configured to be a cache server, however, it should be used for cache data storage only. A cache server node can also contain inference agents and query agents. However for production systems it is recommended that cache server nodes do no other work.
The following sections provide more details about cache server nodes, inference agents, and query agents.
Inference Agents
An inference agent can be described as a rule session. Inference agents are supported in all object management options, but in Cache OM systems, inference agents are connected to the cache cluster, enabling fault tolerance of engine processes and cache data, as well as load balancing.
In TIBCO Designer, one BAR resource (added within an EAR resource) is used to configure an inference agent. For example, you can configure an inference agent with a selection of rule sets to provide business logic on the underlying objects in the cluster.
You also configure what cache modes to use for individual types of objects created and used by the agent (see Working With Cache Modes).
Active inference agents have local working memory that maintains the Rete network of past matches.
An inference agent group is a group of identical agents running in different engines concurrently, to enable load balancing and fault tolerance (see Load Balancing and Fault Tolerance Between Inference Agents). All agents within a group have the same rules deployed and service the same destinations.
Each agent in an inference agent group uses the same agent group name (and also has an internal ID used to identify each agent instance).
See Chapter 21, Configuring Inference Agents (Cache OM).
Cache Server Nodes (Storage Nodes)
The purpose of cache servers is to store and serve cache data for the cluster. A dedicated cache server node is a non-reasoning agent used as a storage node only. It does not instantiate rule sets or query sets. Cache servers are responsible for object management. They participate in distribution, partitioning and storage of the objects in the cluster.
Agent Nodes Functioning as Cache Servers  It is possible, but not generally recommended, to enable inference and query agent nodes to act as cache servers in addition to their other functions. Using dedicated cache server nodes for data storage is more efficient and more scalable for production scenarios.
See Chapter 22, Configuring Cache Servers (Cache OM).
Query Agents
Query agents are available only in TIBCO BusinessEvents Enterprise Suite. They are used only with Cache object management. Query agents enable you to query the objects in the cache using an SQL-like syntax.
A query agent is a non-reasoning agent that and has read-only access to the underlying objects in the cache cluster. A query agent has no Rete network.
You can mix query agents and inference agents within one node as desired.
See Chapter 23, Configuring Query Agents (Cache OM).