Chapter 6 Migrating from Earlier Versions : Upgrading from Version 2.x—Cache Object Management

Upgrading from Version 2.x—Cache Object Management
Cache OM was improved and simplified in many ways in version 3.0.0 and 3.0.1.
It is strongly recommended that you read relevant sections of the TIBCO BusinessEvents User’s Guide documentation to understand the new object management options and reconfigure your projects accordingly. The main items that require reconfiguration are presented in this migration guide. However, some impacts of configuration changes may not be not documented here.
To learn about the 3.x Cache object management options use the following resources:
Caching and backing store tutorials in TIBCO BusinessEvents Getting Started.
Configure the Caching Scheme and Related Cluster Properties
Note that cluster discovery configuration has not changed and does not require migration. However caching scheme configuration has changed.
In 3.x all caching schemes supported out of the box are distributed caching schemes. The best options for most use cases have been determined and much of the need for custom configuration has been removed.
In 2.x you chose the caching scheme using a Cache Name setting in the BAR resource Configuration tab (the field does not exist in 3.x).
In 3.0.0 you chose the caching scheme using the following property:
be.engine.cluster.cacheType
Remove the above property.
To Specify a Caching Scheme
Set the following properties in all engine property files as needed:
be.engine.cluster.hasBackingStore
be.engine.cluster.isCacheLimited
java.property.be.engine.limited.cache.back.size.limit
Quorum of Cache Servers
To determine how many storage-enabled nodes start before data is loaded from a backing store, and before agents become fully active: be.engine.cluster.minCacheServers
See Configuring Caching Scheme, Multi-Engine, and Cluster Properties in TIBCO BusinessEvents User’s Guide.
If You Use a Custom Cache Configuration File in 2.x
Improvements to caching schemes used in 3.x mean that customizing the cache configuration file is generally not required.
Unless directed by TIBCO Support, there is no need to customize the descriptor in this release.
If you used a customized coherence-cache-config.xml file contact TIBCO to determine how to implement the same functionality in the current version.
Configure Cache Servers
It is recommended that production systems use dedicated cache servers.
To deploy any EAR file that contains at least one BAR resource engine as a cache server, set one engine property:
be.engine.cacheServer=true
Any other agent-level properties are ignored
No Cache Loaders in 3.x
In BusinessEvents 2.x, one engine has the role of cache loader. The cache loader was a cache server with an extra job: it loads the objects from the backing store database to the cache at startup.
In BusinessEvents 3.x, any node can take on the role of cache loader at startup and you do not configure one engine to act as the cache loader. Before cache loading begins, a specified number of cache servers and other storage-enabled nodes must be started to hold the data which must be loaded from the backing store.
Choose Multi-Engine or Single-Engine Mode
With Cache OM, inference agents can be deployed in multi-engine mode to achieve load balancing and ruleset chaining between agents in an agent group.
To use multi-engine mode, set the following property in all engine property files:
be.engine.cluster.multiEngineOn=true
Carefully read all related content in TIBCO BusinessEvents User’s Guide. You may need to make some changes to the design of your project to account for concurrently active agents. See Designing With Multiple Active Inference Agents in TIBCO BusinessEvents User’s Guide.
Configure Inference Agents
From version 3.0 and higher, BusinessEvents BAR resources deploy as inference agents, by default. With Cache OM, you must configure agent settings as follows.
(A new Type field on the BAR resource Configuration tab lets you deploy a BAR as a query agent or an inference agent. Inference agent is the default value. Query agents, available in BusinessEvents Enterprise Suite only, and used only with Cache OM, are new in 3.x and so they won’t pose any migration issues.)
Agent Groups  An agent group created when you deploy the same EAR, containing one or more inference agent BAR files, more than one time. Each instance of an agent in each JVM forms an agent group. Many agent-levels settings require you to specify the agent group name.
To Configure Inference Agents (Cache OM)
1.
Open the project in TIBCO Designer and in the BAR resource Configuration tab, enter a name for the inference agent group. It is recommended that you use BAR resource name as agent group name.
2.
in each node’s TRA file, uniquely identify each agent in a group using the following property (required for recovery of scorecards).
   Agent.AgentGroupName.key
3.
   Agent.AgentGroupName.l1CacheSize
   Agent.AgentGroupName.threadcount
   Agent.AgentGroupName.recoveryPageSize
Configure fault tolerance settings as explained next.
Configure Fault Tolerance Settings
For In Memory object management, fault tolerance configuration has not changed in 3.x.
If you use Cache OM, you must reconfigure fault tolerance when you configure the inference agents.
Fault tolerance in 3.x is set at the inference agent level. Fault tolerance is provided between agents in an agent group.
To Configure Fault Tolerance
1.
Remove the following properties from your engine properties files (be-engine.tra files or supplementary files you use to set engine properties):
   be.ft.nodename
   Engine.FT.GroupName
   Engine.FT.UseFT
   Engine.FT.Weight
In 3.x, the above FT properties are used for In Memory object management only.
2.
   Agent.AgentGroupName.maxActive
If you deploy more agents in a group than the maxActive number, those agents are deployed in inactive mode.
3.
   Agent.AgentGroupName.priority
Priority determines which agents start up first and therefore which agents remain inactive. Smaller numbers indicate higher priorities (one is the highest priority).
Each instance of an agent deploys in a different node (engine). Therefore set the priority as needed in each engine’s property file to determine failover and failback behavior. Remember to configure the settings for each agent group, if an EAR file contains more than one BAR.
For example in one TRA file you might have two agent groups configured as follows:
Agent.AcmeGroup.maxActive=3
Agent.AcmeGroup.priority=1
Agent.Mygroup.maxActive=2
Agent.Mygroup.priority=1