Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Cache OM Tutorial : Add a CDD File for Cache Object Management and Build the EAR

Add a CDD File for Cache Object Management and Build 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.
Learning Points
How do I cluster nodes discover each other?  For the tutorial you can use the default multicast node discovery settings. You can also change the defaults as needed to avoid collisions with another cluster in the same network. Cluster discovery settings are available for different situations, such as hosts with multiple NICs. Another method of cluster discovery uses well-known addresses for situations where use of multicast is not an option.
How do I configure agents and processing units? A processing unit deploys as a TIBCO BusinessEvents engine. At a minimum, you list the agents you want to run in one processing unit. For this example, you do not have to do any processing unit configuration because defaults will work out of the box. However, for real-world scenarios, where concurrency features are used, and perhaps add-on products, processing unit configuration requires some thought and planning. The processing unit definitions are also used in the TIBCO BusinessEvents Monitoring and Management component, for deploy-time configuration.
Number of cache agents to start  For a production environment you can define how many cache agents must be started before the system startup can continue. The default is one. When a backing store is used, cache agents can preload objects from a backing store at system startup. More cache agents make the preloading phase quicker. See the Cache Agent Quorum setting in the Object Management Configuration panel.
More Information
In TIBCO BusinessEvents Developer’s Guide see the following:
Task C Add and Configure a CDD
Start with a new CDD because the provided Cache OM template sets many default values you’ll need.
1.
In TIBCO BusinessEvents Studio Explorer, right click the project name and select New > Cluster Deployment Descriptor. You see the New Cluster Configuration Wizard.
2.
In the File name field, type fdCache and click Next.
If you click Finish instead of Next, you do not have the opportunity to use the Cache OM template. If you accidentally click Finish, just delete the file and add a new one, and this time click Next.
By default, the CDD file name you specify is also used as the cluster name.
3.
You see the Object Manager Selection dialog. Select Cache from the Object Management Type drop-down list, then click Finish. You see the CDD editor.
4.
In the Cluster tab, select Properties. You do not need to add any properties, unless you need to change the defaults for the discovery URL and the listen URL (which is used by the nodes to communicate with each other). Here are the cluster properties with their default values for your information:
   be.engine.cluster.as.discover.url=tibpgm://7888/;239.8.8.9
   be.engine.cluster.as.listen.url=tcp:// 0.0.0.0 /random port 3000+
For details see Configuring DataGrid Discover URL and Configuring DataGrid Listen URL in TIBCO BusinessEvents Developer’s Guide.
Cluster Clashes  If you have clashes with other clusters running on your machine, use a different cluster name, discovery URL and listen URL from the other cluster or clusters.
5.
For your information, in the Cluster tab, select Object Management. You can see that TIBCO is selected as the Cache Provider, and that Number of Backup Copies is 1, meaning the distributed cache contains one copy of each entity in the cache.
Limited Cache  The Entity Cache Size and Object Table Cache Size settings in the Object Management tab take effect only if you use a limited cache. By default, the cache is not limited. In Domain Objects > Default, the setting Is Cache Limited is not checked. However when you add a backing store, it is common to use a limited cache, because you can store all objects in the backing store. You can override the limited cache setting at the object level, as desired.
6.
Configure the inference-class agent class with the Channels/Http/AllOps destination
Configure the RuleFunctions/InitializeScorecard rule function as the startup rule function.
For details, see Task R, Add and Configure a CDD on page 44. and complete step 4 through step 7.
No configuration is needed for the cache-agent class.
7.
8.
Build the EAR file using the name fdcache. If you need a refresher on building the EAR file, see Task S, Build the EAR File.
Summary and Next Steps
You have configured the CDD for cache cluster discovery, and you configured the processing units and agents as you did before. Now you can start the project and see how things work at runtime.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved