Optimizing the embedded global cache for use with different types of cache data

You can configure your embedded global cache to use different locking strategies for different cache maps, and you can configure the use of replica shards of a cache map for read access.

Before you begin

For more information about the default global cache topology, see Data caching overview.

About this task

The embedded global cache in IBM App Connect Enterprise supports the configuration of the following properties:
  • Locking strategies: Using the appropriate locking strategy can reduce the associated computational work and help improve achievable throughput. The following table details the strategies that are supported and the situations in which the strategies might be used:
    Locking strategy Use case
    Pessimistic (default) Cache data is updated frequently from multiple sources.
    Optimistic Cache data is updated from multiple sources but the same cache record is unlikely to be updated by two sources simultaneously.
    None Cache data is static or updated infrequently from a single source.
    For more information about the locking strategies, see the WebSphere eXtreme Scale documentation, http://www.ibm.com/support/knowledgecenter/SSTVLU_8.6.1/com.ibm.websphere.extremescale.doc/cxslockstrategy.html.
    Note: The optimistic locking strategy that is used in IBM App Connect Enterprise uses the "Optimistic no versioning locking" configuration that is described in the WebSphere eXtreme Scale documentation.
  • Read access to replica shards of a cache map. Reading from replica shards of a cache map can help to distribute workload amongst container servers. By default, data is read from only the primary shard of a cache map but you can configure the embedded global cache to support read access to replica shards. You might configure this property if your applications can tolerate the use of cache data that might be out-of-date. For more information about read access to replica shards of a cache map, see the WebSphere eXtreme Scale documentation, http://www.ibm.com/support/knowledgecenter/SSTVLU_8.6.1/com.ibm.websphere.extremescale.doc/cxsreadreplx.html.

Procedure

If you want to configure locking strategies or read access to replica shards of a cache map, you must complete the following steps:

  1. Create a copy of the following files from the InstallDir\server\sample\globalcache directory where InstallDir is the IBM App Connect Enterprise installation directory:
    • objectgrid.xml
    • deployment.xml
  2. Open the objectgrid.xml file and add or edit the backingMap name entries in the <objectGrid name="WMB"> section with patterns that match the names of your cache maps.
  3. Open the deployment.xml file and add or edit the map ref entries in the <objectgridDeployment objectgridName="WMB"> section with patterns that match the names of your cache maps.
    Note:
    • You must not remove the entry that matches the default cache map for the IBM App Connect Enterprise embedded global cache (SYSTEM.BROKER.*).
    • The backingMap name entries in the objectgrid.xml file must be the same as the map ref entries in the deployment.xml file.
  4. Optional: If you want to configure locking strategies for cache maps in the embedded global cache, see Configuring locking strategies for the embedded global cache.
  5. Optional: If you want to configure the embedded global cache to read data from a replica shard of a cache map, see Configuring the embedded global cache to read data from replica shards of a cache map.