Installing
and configuring the dynamic cache provider for
eXtreme Scale depends on what your requirements are and the environment
you have set up.
About this task
For information about using the
eXtreme Scale dynamic cache provider
with IBM® WebSphere Commerce, see the following topics
in the IBM WebSphere Commerce documentation:
If you are not specifically directing
your caching to
a defined Object Cache or Servlet Cache instance, then it is likely
that the Dynamic Cache API calls are being serviced by the baseCache.
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. Remember that these configuration properties need to be
set as Java™ Virtual
Machine (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.
- Enable the eXtreme Scale dynamic
cache provider.
- WebSphere Application Server Version
7.0 and later:
You can configure the dynamic cache service
to use the eXtreme Scale dynamic
cache provider with the administrative console. 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 WebSphere Application Server Version
7.0 information center: Selecting a cache service provider.
- WebSphere Application Server Version 6.1:
Use
a custom property to configure the dynamic cache service to use the
eXtreme Scale dynamic cache provider.
You can also use these custom properties in
WebSphere Application Server Version 7.0
and later. To create a custom property on a cache instance, click . If you are using the base cache instance, create the
custom properties on the JVM.
- com.ibm.ws.cache.CacheConfig.cacheProviderName
- To use the eXtreme Scale dynamic
cache provider, set the value to com.ibm.ws.objectgrid.dynacache.CacheProviderImpl.
You can create this custom property on a dynamic cache instance, or
the base cache instance. If you choose to set the custom property
on the base cache instance, then all other cache instances on the
server use the eXtreme Scale provider
by 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. To override
the base cache instance and make a particular dynamic cache instance
use the default dynamic cache provider, create the com.ibm.ws.cache.CacheConfig.cacheProviderName
custom property on the dynamic cache instance and set the value to default.
- Optional: If you are using replicated cache
instances, configure the replication setting for the cache.
With
the eXtreme Scale dynamic cache
provider, you can have local cache instances or replicated cache instances.
If you are only using local cache instances, you can skip this step.
Use
one of the following methods to configure the replicated cache:
- Enable cache replication with the administrative
console.
You can enable cache replication at any time in WebSphere Application Server Version 7.0. In WebSphere Application Server Version 6.1, you must
create a DRS replication domain.
- Enable cache
replication with the com.ibm.ws.cache.CacheConfig.enableCacheReplication
custom property to force the cache to report that it is a replicated
cache, even though a DRS replication domain has not been assigned
to it. Set the value of this custom property to true.
Set this custom property on the cache instance if you are using an
object cache or servlet cache, or on the JVM if you are using the
baseCache instance.
- Optional: If you are using eXtreme Scale as
a JSP fragment
cache, set the com.ibm.ws.cache.CacheConfig.disableTemplateInvalidation
custom property to true to disable template-based
invalidations during JSP reloads.
- Configure
the topology for the dynamic cache service.
The only
required configuration parameter for the eXtreme Scale dynamic cache provider
is the cache topology. Set the custom property on the cache instance
or for the dynamic cache service if you are using baseCache instance.
Enter the name of the custom property as: com.ibm.websphere.xs.dynacache.topology.
The
three possible values for this property follow. You must use one of
the allowed values:
- embedded
- embedded_partitioned
- remote
If you are using
embedded or embedded partitioned topologies,
consider setting the com.ibm.ws.cache.CacheConfig.ignoreValueInInvalidationEvent custom
property to true to save some serialization
costs. Set this custom property on the cache instance or the JVM if
you are using the baseCache instance.
- Optional: If you are using an
embedded
partitioned
topology, configure the number of initial containers for the dynamic
cache service.
You can maximize the performance of caches
that are using the embedded partitioned topology by configuring the
number of initial containers. Set the variable as a system property
on the WebSphere Application Server Java virtual machine.
Enter
the name of the property as: 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 that
are accessing this distributed cache instance. For example, if a
dynamic cache service is shared between data grid members, then the
value should be set to the number of data grid members.
For
embedded or embedded_partitioned topologies, you must be using Version
7.0 of WebSphere Application Server. Set the following
custom property on the JVM process to ensure that the initial containers
are available right away.
com.ibm.ws.cache.CacheConfig.createCacheAtServerStartup=true
- Configure the eXtreme Scale catalog
service grid.
When you are using eXtreme Scale as the
dynamic cache provider for a distributed cache instance, you must
configure an eXtreme Scale catalog service domain.
A single catalog service
domain can service multiple dynamic cache service providers backed
by eXtreme Scale.
A catalog service can run inside or outside of WebSphere Application Server processes. Starting
with eXtreme Scale Version
7.1, when you use the administrative console to configure catalog
service domains, the dynamic cache uses these settings. It is not
necessary to take additional steps to set up a catalog service. For
more information, see Creating catalog service domains in WebSphere Application Server.
- Configure
custom key objects.
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 servers for more information.
- Optional: If you are using a remote
topology,
configure the eXtreme Scale container
servers.
- Embedded or embedded partitioned
topology:
The cached
data is stored in WebSphere eXtreme Scale container
servers. Container servers 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.
- Remote
topology:
When you are using the remote topology,
you must start up stand-alone eXtreme Scale container servers
before the WebSphere Application Server instances
that access the cache instance start. To start stand-alone container
servers, see Starting and stopping stand-alone servers. Verify that
all the container servers for a specific dynamic cache service point
to the same catalog service endpoints.
The XML configuration
files for the stand-alone eXtreme Scale dynamic
cache provider containers are in either the was_root/optionalLibraries/ObjectGrid/dynacache/etc directory
for installations on top of WebSphere Application Server,
or the wxs_install_root/ObjectGrid/dynacache/etc directory
for stand-alone installations. The files are named dynacache-remote-objectgrid.xml and dynacache-remote-definition.xml.
Make copies of these files to edit and use when you are starting stand-alone
containers for the eXtreme Scale dynamic
cache provider. The numInitialContainers parameter in the dynacache-remote-deployment.xml file
must match the number of container processes that are running. Note
that the numberOfPartitions attribute in the dynacache-remote-objectgrid.xml file
has a default value of 47.
Note: The set
of container server processes must have enough free memory to service
all the dynamic cache instances that are configured to use the remote
topology. Any
WebSphere Application Server process
that shares the same or equivalent values for the catalog.services.cluster
custom property must use the same set of stand-alone containers.
The number of containers and number of servers on which they reside
must be sized appropriately. See
Dynamic cache capacity planning for
additional details.
A command line entry that starts a stand-alone
container for the eXtreme Scale dynamic cache provider follows:
startOgServer.sh container1 -objectGridFile
../dynacache/etc/dynacache-remote-objectgrid.xml -deploymentPolicyFile
../dynacache/etc/dynacache-remote-deployment.xml -catalogServiceEndPoints
MyServer1.company.com:2809
- For distributed or embedded topologies,
enable the sizing
agent to improve memory consumption estimates.
The
sizing agent estimates memory consumption (usedBytes statistic). The
agent requires a Java 5 or higher
JVM.
Load the agent by adding the following argument to the
JVM command line:
-javaagent:WXS lib directory/wxssizeagent.jar
For
an embedded topology, add the argument to the command line of the WebSphere Application Server process.
For
a distributed topology, add the argument to command line of the eXtreme Scale processes
(containers) and the WebSphere Application Server process.