Cache OM Tutorial
In this tutorial, you will add caching functionality to your project and deploy two cache agents and one inference agent.
This tutorial uses the FraudDetection project configured in Project Design Tutorial.
Cache OM is used in most production systems because of the additional functionality, reliability, and high availability it provides, especially when a backing store is also used to store the data generated by the system on disk.
To explore basic caching features, you will make some minor modifications to the FraudDetection project used in the Project Design Tutorial. Modifications are required to retrieve objects from cache, or to check that objects do not already exist in cache before creating them.
Then you’ll deploy two engines, each with one agent: an inference agent and a cache agent. You will observe how stopping and starting the inference agent does not affect how events are handled, because the objects are stored in the cache. You can also start a second cache agent to observe how two cache agents work together. You can stop and restart one cache agent with no loss of data.
Before you begin the tutorial, take a few minutes to learn a few important points about cache object management, in the next section, TIBCO BusinessEvents Cache Fundamentals. Setting up cache OM is fairly simple. Understanding how to manage cache objects and how to design for concurrency take some thought.
Note that the FraudDetectionCache project contains a site topology file, FraudDetectionCache.st, for use in Monitoring and Management Tutorial.
- TIBCO BusinessEvents Cache Fundamentals
Read this section to grasp the basic ideas you need to understand and work with cache object management. - FraudDetection Example
In this tutorial you will use a copy of the provided FraudDetection example project. - Event Preprocessor and the Rete Network
Since this project uses Cache Only mode, after each RTC the data created in the agent is saved to the cache and removed from the Rete network. - CDD File for Cache Object Management and the EAR
To set up the project for cache object management, you create a new CDD file using the template provided for cache OM. The CDD template defines an inference agent class and a cache agent class, and default values for cluster level properties, so it doesn’t take much to configure an example project to work. Other configuration options are available for different situations. - Deployment of Inference and Cache Agents
The agents you have configured are now ready for deployment.