Configuring an enterprise data grid in a stand-alone environment for dynamic caching

Copy and modify deployment and objectGrid XML descriptor files to configure an enterprise grid for dynamic caching. These files are used to start an enterprise data grid.

About this task

When WebSphere® eXtreme Scale is specified as the provider for a WebSphere Application Server dynamic cache instance, the WebSphere eXtreme Scale servers are started in either a stand-alone environment or within a WebSphere Application Server environment, see Starting and stopping stand-alone servers for more information. This process requires the use of deployment and objectGrid descriptor files that are used to configure the enterprise data grid. Dynamic caching requires a specific configuration. Therefore, several XML files are delivered with WebSphere eXtreme Scale that are intended to be copied, altered (as needed), and used to start the enterprise data grid. These files can be used as-is, but are subject to change and therefore must copied to a separate location before they are altered or used.
Note: Depending on how you installed WebSphere eXtreme Scale, these files are in either the was_root/optionalLibraries/ObjectGrid/dynacache/etc directory for installations with WebSphere Application Server; or for an installation in a stand-alone environment, these files are in the wxs_install_root/ObjectGrid/dynacache/etc directory.
Important: Copy these files to some other location before they are edited or used.
Dynamic cache descriptor file (dynacache-deployment.xml)
This file is the deployment descriptor file for starting a container server for dynamic caching. For more information, see Deployment policy descriptor XML file. Although this file can be used as-is, the following elements or attributes are occasionally changed or have significant importance:
  • mapSet name and map ref

    The name attribute in mapSet, and the defined value for map ref do not directly correspond to the dynamic cache instance name configured for WebSphere Application Server and are typically not changed. If, however, these values are changed, then corresponding custom properties must be added to the configuration of the dynamic cache instance. For more information, see Customizing a dynamic cache instance with custom properties.

  • numberOfPartitions

    This attribute can be changed to represent the appropriate number of partitions for your configuration. For more information, see Planning environment capacity.

  • maxAsyncReplicas

    This attribute can be changed. A dynamic cache typically is used in a side-cache model with a database or some other source as the system of record for the data. As a result, setting this value to OPTIMISTIC or NONE triggers near cache processing, when the IBM eXtreme IO (XIO) transport type is used, and the space and performance trade-offs that are required to make the data highly available discourage the use of replication. However, in some cases high availability is important.

  • numInitialContainers

    This attribute must be set to the number of containers that are included in the initial startup of the enterprise data grid. Having this set correctly aids in the placement and distribution of partitions throughout the data grid.

Dynamic cache ObjectGrid descriptor XML file (dynacache-objectgrid.xml)
This file is the recommended ObjectGrid descriptor file for starting a container server for dynamic caching. For more information, see ObjectGrid descriptor XML file. It is configured to run with the eXtreme IO transport type (XIO) using eXtreme Data Formatting (XDF). In addition, the Dependency ID and Template ID indexes are configured to use a Global Index, which improves invalidation performance. Although this file can be used as-is, the following elements or attributes are occasionally changed or have significant importance.
  • objectGrid name and backingMap name

    The name attributes in the objectGrid and backingMap elements do not directly correspond to the dynamic cache instance name configured for WebSphere Application Server cache instance and typically do not need to be changed. If, however, these attributes are changed, then the corresponding custom properties must be added to the configuration of the dynamic cache instance. For more information, see Customizing a dynamic cache instance with custom properties.

  • copyMode

    Set this attribute to COPY_TO_BYTES. This value enables eXtreme Data Format (XDF) when the eXtremeIO (XIO) transport type is used. Changing to some other copyMode disables XDF and requires that you uncomment the ObjectTransformer plug-in bean.

  • lockStrategy

    Set this attribute to PESSIMISTIC. Setting this value to OPTIMISTIC or NONE triggers near cache processing and must be accompanied with properties from the dynamic-nearcache-objectgrid.xml file.

  • backingMapPluginCollections

    This element is required. The child elements Evictor plug-in and MapIndex plug-in are both required for dynamic caching and must not be removed.

  • GlobalIndexEnabled

    Both the DEPENDENCY_ID_INDEX and TEMPLATE_INDEX contain a GlobalIndexEnabled property that is set to true. Setting this value to false disables the global index feature for these indexes. It is recommended to leave these global indexes enabled unless you are running with a small number of total partitions, for example, less than 40.

  • objectTransformer

    Since this objectGrid descriptor file is intended to run in eXtreme Data Format (XDF), it is commented out. If you want to disable XDF (by changing the copyMode value), then you must uncomment this plug-in.

Dynamic near cache ObjectGrid descriptor file (dynacache-nearcache-objectgrid.xml)
This file is the recommended ObjectGrid descriptor file for starting container servers for dynamic caching when a you want a near cache. It is configured to run with XIO and XDF. In addition, the Dependency ID and Template indexes are configured to use a Global Index, which improves invalidation performance. The dynamic caching near cache capability requires the use of the XIO transport type.
Although this file can be used as-is, the following elements or attributes are occasionally changed or have significant importance:
  • objectGrid name and backingMap name

    These values in this file do not directly correspond to the dynamic cache instance name configured for the WebSphere Application Server's cache instance and typically do not need to be changed. If, however, these values are changed, then corresponding custom properties must be added to the configuration of the dynamic cache instance.

  • lockStrategy

    This property must be set to OPTIMISTIC or NONE to enable a near cache. No other lockingStrategy supports a near cache.

  • nearCacheInvalidationEnabled

    This property must be set to true to enable a dynamic caching near cache. A publish/subscribe model flows invalidations from the far cache to the near cache instances, keeping them synchronized.

  • nearCacheLastAccessTTLSyncEnabled
    This property must be set to true to enable a dynamic caching near cache. A publish/subscribe model flows invalidations from the far cache to the near cache instances, keeping them synchronized.
    [Version 8.6.0.4 and later]Note: Setting the nearCacheLastAccessTTLSyncEnabled property to true is optional.
  • copyMode

    This backingMap property is set to COPY_TO_BYTES. This value enables eXtreme Data Format (XDF) when the eXtremeIO (XIO) transport type is used. Changing to some other copyMode disables XDF and requires that the ObjectTransformer plug-in bean is uncommented.

  • CollisionArbitor

    This public interface decides what value to store when there is a collision on multiple primaries.

  • backingMapPluginCollections

    The MapIndexPlugins and Evictor are mandatory items for dynamic caching and must not be removed.

  • GlobalIndexEnabled

    Both the DEPENDENCY_ID_INDEX and TEMPLATE_INDEX contain a GlobalIndexEnabled property set to true. Setting this value to false disables the global indexfeature for these indexes. It is recommended to leave these global indexes enabled unless you are running with a small number of total partitions (< 40).

  • ObjectTransformer

    Because this file is intended to run in eXtreme Data Format (XDF) this plug-in is commented out. If XDF is to be disabled (by changing the copyMode), then this plug-in must be uncommented.

Dynamic legacy ObjectGrid descriptor file (dynacache-legacy85-objectgrid.xml)
This file is the recommended ObjectGrid descriptor file for starting a container server for dynamic caching when you enable a near cache. Although this file can be used as-is, the following elements or attributes are occasionally changed or have significant importance:
  • objectGrid name and backingMap name

    These values in this file do not directly correspond to the dynamic cache instance name configured for the WebSphere Application Server's cache instance and typically do not need to be changed. If, however, these values are changed, then corresponding custom properties must be added to the configuration of the dynamic cache instance.

  • copyMode

    This backingMap property is set to COPY_ON_READ_AND_COMMIT. This value must not be changed.

  • lockStrategy

    This backingMap property is set to PESSIMISTIC. This value must not be changed.

  • backingMapPluginCollections

    The MapIndexPlugins, Evictor, and Object Transformer are mandatory items for dynamic caching and must not be removed.