Installing and configuring the dynamic cache provider for eXtreme Scale depends on what your requirements are and the environment you have set up.
To use the dynamic cache provider, WebSphere® eXtreme Scale must be installed on top of the WebSphere Application Server node deployments, including the deployment manager node. The eXtreme Scale dynamic cache provider is supported on the following versions of WebSphere Application Server.
For installation instructions, see Installing for 6.1 or Installing for 7.0.
Follow these steps to configure the eXtreme Scale dynamic cache provider:
In WebSphere Application Server 7.0, you can configure the dynamic cache service to use the eXtreme Scale dynamic cache provider with the administrative console or with a custom property .
After you install eXtreme Scale, the eXtreme Scale dynamic cache provider is immediately available as a "Cache Provider" option in the administrative console. For more information, see Selecting a cache service provider.
You can also configure the eXtreme Scale dynamic cache provider for a cache instance by setting the following custom property and value pairs on the instance. These custom properties are the only way to enable the eXtreme Scale provider on WebSphere Application Server 6.1, as follows.
com.ibm.ws.cache.CacheConfig.cacheProviderName = "com.ibm.ws.objectgrid.dynacache.CacheProviderImpl”
If you want to use the eXtreme Scale dynamic cache provider for JSP, Web services or command caching, then you must set the baseCache instance to use the eXtreme Scale dynamic cache provider. The same configuration properties are used to configure the baseCache instance. Also remember that these configuration properties need to be set as JVM custom properties. This caveat applies to any cache configuration property discussed in this section except for servlet caching. To use eXtreme Scale with the dynamic cache provider for servlet caching, be sure to configure enablement in system properties rather than custom properties.
If the baseCache is configured to use the eXtreme Scale dynamic cache provider, then all other cache instances in the server will use the eXtreme Scale provider by default. In order to make a cache instance use the default dynamic cache provider, set the cache provider property as follows: com.ibm.ws.cache.CacheConfig.cacheProviderName = "default". Any eXtreme Scale dynamic cache provider configuration properties set for the baseCache are the default configuration properties for all cache instances backed by eXtreme Scale. Customers need to be very careful about relying on default values for these properties.
With the eXtreme Scale dynamic cache provider it is possible to have local cache instances and replicated cache instances. In the case of local cache instances, no further configuration is required and the rest of this section may be skipped.
Replicated caches can be created in two ways. The first way is to enable cache replication via the admin console. This enablement can be done at any time in WebSphere Application Server Version 7.0, but will require the creation of a DRS replication domain in WebSphere Application Server Version 6.1.
The second way is to use the following custom property and value pair to force the cache to report that it is a replicated cache, even though a DRS replication domain has not been assigned to it.
com.ibm.ws.cache.CacheConfig.enableCacheReplication = “true”
The only required configuration parameter for the eXtreme Scale dynamic cache provider is the cache topology. The following variable should be set as a Custom Property on the dynamic cache service.
com.ibm.websphere.xs.dynacache.topology
You must use one of the allowed values.
You can maximize the performance of caches that are using the embedded partitioned topology by configuring the number of initial containers. The following variable should be set as a system property on the WebSphere Application Server Java virtual machine.
com.ibm.websphere.xs.dynacache.num_initial_containers
The recommended value of this configuration property is an integer that is equal to or slightly less than the total number of WebSphere Application Server instances accessing this distributed cache instance. For example, if a dynamic cache service is shared between grid members, then the variable should be set to the number of grid members.
When you are using eXtreme Scale as the dynamic cache provider for a distributed cache instance, you must configure an eXtreme Scale catalog service grid.
A single catalog service grid can service multiple dynamic cache service providers backed by eXtreme Scale.
A catalog service can run inside or outside of WebSphere Application Server processes. To set up a catalog service, see Starting the catalog service process in a stand-alone environment or Starting the catalog service process in a WebSphere Application Server environment.
When you are running a catalog service grid, you must set the catalog.services.cluster custom property for the catalog service endpoints.
When you are using custom objects as keys the objects must implement the Serializable or Externalizable interface. When you are using the embedded or embedded partitioned topologies, you must place objects on the WebSphere shared library path, just like if they were being used with the default dynamic cache provider. See Using the DistributedMap and DistributedObjectCache interfaces for the dynamic cache in the WebSphere Application Server Network Deployment information center for more details.
If you are using the remote topology, you must place the custom key objects on the CLASSPATH for the standalone eXtreme Scale containers. See Starting container processes for more information.
The cached data is stored in WebSphere eXtreme Scale containers. Containers can run inside or outside of WebSphere Application Server processes. The eXtreme Scale provider automatically creates containers inside the WebSphere process when you are using embedded or embedded partitioned topologies for a cache instance. No further configuration is needed for these topologies.
When you are using the remote topology, you must start up stand-alone eXtreme Scale containers before the WebSphere Application Server instances that access the cache instance start up. To start stand-alone containers, see Starting container processes. Make sure that all the containers for a specific dynamic cache service point to the same catalog service endpoints.
The XML configuration files for the standalone eXtreme Scale Dynamic Cache provider containers are located in either the <install_root>/customLibraries/ObjectGrid/dynacache/etc directory for installations on top of WebSphere Application Server, or the <install_root>/ObjectGrid/dynacache/etc directory for standalone installations. The files are named dynacache-remote-objectgrid.xml and dynacache-remote-definition.xml. Make copies of these files to edit and use when launching standalone containers for the eXtreme Scale dynamic cache provider. The numIntitialContainers parameter in the dynacache-remote-deployment.xml file should be set accordingly with the number of container processes being run.
An example UNIX® command line entry that launches a standalone container for the eXtreme Scale dynamic cache provider is shown in the following code:
startOgServer.sh container1 -objectGridFile ../dynacache/etc/dynacache-remote-objectgrid.xml -deploymentPolicyFile ../dynacache/etc/dynacache-remote-deployment.xml -catalogServiceEndpoints MyServer1.company.com:2809