Creating dynamic cache data grids

You can use IBM® WebSphere® DataPower® XC10 Appliance to store data from your WebSphere Application Server dynamic cache. By setting up this capability, you can enable applications that are written with the Dynamic Cache API or applications using container-level caching (such as servlets) to use the features and performance capabilities of the appliance.

Before you begin

  • You must install the WebSphere eXtreme Scale Client in your WebSphere Application Server configuration. See Installing WebSphere eXtreme Scale Client for more information.
  • If your appliance has transport layer security enabled, or you want to ensure that clients use transport layer security, you must also enable global security in the WebSphere Application Server administrative console. See Configuring Transport Layer Security (TLS) for more information.

About this task

When you configure the dynamic cache provider in WebSphere Application Server to use DataPower XC10 Appliance, the cache data is stored outside of the WebSphere Application Server topology. All the cache data is stored in the appliance. The memory that was being used for caching in your application servers can be used for other purposes.
For information about using WebSphere eXtreme Scale Client and DataPower XC10 Appliance dynamic cache data grids with IBM WebSphere Commerce, see the following topics in the IBM WebSphere Commerce documentation:
  • Enabling the dynamic cache service and servlet caching
  • Enabling WebSphere Commerce data cache

Procedure

  1. Specify the catalog service that is running on the appliance in WebSphere Application Server. The catalog service enables the WebSphere Application Server dynamic cache configuration to communicate with the DataPower XC10 Appliance. You can configure the catalog service in the WebSphere Application Server administrative console by creating a catalog service domain. See Creating catalog service domains in WebSphere Application Server for more information.
  2. Create the data grid on the DataPower XC10 Appliance and configure the required security settings. You can either run the dynaCfgToAppliance script or create the configuration manually.
    Creating the data grid configuration with the dynaCfgToAppliance script:
    This script gets installed in the bin directory of the deployment manager profile when you install the WebSphere eXtreme Scale Client. Before you run this script, verify that both the appliance and the deployment manager are running:
    dynaCfgToAppliance <IP_address> <cache_name> <appliance_admin> <admin_pw> <SOAP_port> <soap.client.props>
    IP_address
    Specifies the IP address of the DataPower XC10 Appliance on which you want to store your dynamic cache data.
    cache_name
    Specifies the JNDI name of the dynamic cache. If there are any slashes (/) in the JNDI name of the dynamic cache, the slashes are converted to a dash for the name of the data grid in the DataPower XC10 Appliance. For example, if the dynamic cache name is services/cache1, the data grid that is created on the appliance is named services-cache1. The following characters cannot be used in the name of the data grid in the DataPower XC10 Appliance: ^ . \\ / , # $ @ : ; \ * ? < > | = + & % [ ] " ".
    appliance_admin
    Specifies the administrator ID for logging in to the DataPower XC10 Appliance user interface.
    admin_pw
    Specifies the administrator password for logging in to the DataPower XC10 Appliance user interface.
    SOAP_port
    (Optional) Specifies the SOAP port for the deployment manager if you are using a port number other than the default of 8879.
    soap.client.props
    (Optional) Specifies the path to the soap.client.props file. You must specify this file if you have enabled security in WebSphere Application Server. This file enables SOAP security and specifies the user name and password to administer the WebSphere Application Server deployment manager:
    com.ibm.SOAP.securityEnabled=true
    com.ibm.SOAP.loginUserid=
    com.ibm.SOAP.loginPassword=
    See SOAP connector and Inter-Process Communications connector properties files for more information about the soap.client.props file.
    This script creates the data grid on the appliance. The script also sets the DataPower XC10 Appliance specific ID and password credentials that you specified with the appliance_admin and admin_pw parameters with the following custom properties:
    • xc10.<data_grid_name>.userid
    • xc10.<data_grid_name>.password
    These property names are not case sensitive. The password value is encoded. If you run the script again after the initial configuration, the custom properties are updated.
    Manually creating the data grid configuration:
    1. Create the dynamic cache data grid in the DataPower XC10 Appliance user interface. Click Data Grid > Dynamic Cache. The name of the cache must match the JNDI name of the dynamic cache in the WebSphere Application Server configuration. When you enter the JNDI name replace any slashes (/) with a dash for the name of the data grid in the DataPower XC10 Appliance. For example, if the dynamic cache name is services/cache1, enter the name as services-cache1.
    2. Create the xc10.<data_grid_name>.userid and xc10.<data_grid_name>.password custom properties on the WebSphere Application Server cell. The value of the <data_grid_name> in each custom property is the JNDI name of the data grid, replacing any slashes (/) with dashes. For example, with the previous example, the custom property names are xc10.services-cache1.userid and xc10.services-cache1.password. The values should be set to a user ID and password that can access the data grid in the DataPower XC10 Appliance configuration. You can encode the password by using the encodePassword script, which is in the bin directory of the deployment manager.
  3. Complete the configuration for your version of WebSphere Application Server. Create a cache instance that you want to configure with DataPower XC10 Appliance. The name of this cache instance must be the same as the value that you provided for the cache_name parameter in the dynaCfgToAppliance script. You can also configure the baseCache instance. However, if you use the baseCache instance, you must create the following custom properties on the Java virtual machine (JVM). When you configure the baseCache instance, all of the cache instances in the JVM also have the properties set. You can override the values of the baseCache custom properties by creating custom properties on the individual cache instances. See the following links for more information about creating cache instances:
    • Using servlet cache instances
    • Using object cache instances
    To create a custom property on the cache instance in the WebSphere Application Server administrative console, click Resources > Cache instances > cache_instance_type > cache_instance_name > Custom properties..

    For WebSphere Application Server Version 7.0:

    1. Enable the DataPower XC10 Appliance as the dynamic cache provider.

      Select the WebSphere eXtreme Scale dynamic cache provider in the administrative console. For more information, see Selecting a cache service provider

    2. Configure the replication setting for the cache.

      You can enable cache replication in the WebSphere Application Server Version 7.0 administrative console. See Configuring cache replication for more information.

    3. Set the topology custom property on the cache instance that you want to modify. Specify the name of the custom property as com.ibm.websphere.xs.dynacache.topology and the value of the custom property as remote.

    For WebSphere Application Server Version 6.1:

    1. Enable the DataPower XC10 Appliance as the dynamic cache provider.

      Configure the dynamic cache provider for a cache instance by setting the com.ibm.ws.cache.CacheConfig.cacheProviderName custom property on the cache instance. To set the provider to use the DataPower XC10 Appliance, set the value to com.ibm.ws.objectgrid.dynacache.CacheProviderImpl.

      If you need to set the provider back to the default WebSphere Application Server dynamic cache provider for a specific cache instance, you can set the name of the custom property to default. If you are configuring the baseCache instance to use the DataPower XC10 Appliance cache provider, you might need to set the property to default on your other cache instances if you want them to use the default cache provider.
    2. Configure the replication setting for the cache.
      You must also create a replication domain. You can configure the replication domain with the administrative console or a custom property:
      • Administrative console: See Replicating data with a multi-broker replication domain for more information.
      • Custom property: You can also use the com.ibm.ws.cache.CacheConfig.enableCacheReplication custom property on the cache instance to force the cache to report that it is a replicated cache, even though a replication domain has not been assigned. Specify the name of the custom property as com.ibm.ws.cache.CacheConfig.enableCacheReplication and the value of the custom property as true.
    3. Set the topology custom property on the cache instance that you want to modify. Specify the name of the custom property as com.ibm.websphere.xs.dynacache.topology and the value of the custom property as remote.

Results

By configuring the dynamic cache service to use the appliance as the cache provider, less memory is used by your application servers. All the cache data is offloaded to the appliance and is no longer stored in application server memory.

What to do next

  • Configure security before you begin to send data to the data grid. See Securing data grids for more information.
  • Configure replicas. Replicas ensure that your data grid data is available if the primary copy fails. To configure replicas, click Data Grid > Dynamic Cache > Show advanced attributes. Replicas are created only when the appliance is in a collective. If the number of appliances in the collective is n, the maximum number of replicas is n-1. Therefore if you configure three replicas, but you only have two appliances in the collective, only one replica is created. Additional replicas are created if you add appliances to the collective. Set the number of replicas to the ideal amount that you want to have, so that as appliances join the collective, new replicas can be created. The data grid content is cleared when you edit the number of replicas.
  • Configure a capacity limit for the data grid. By configuring capacity limits on the data grid, you can ensure that the storage capacity for the collective is used in a predictable manner. See Configuring the maximum capacity of a data grid for more information.
  • You can monitor your dynamic cache data grid in the DataPower XC10 Appliance user interface. See Monitoring data grids in the user interface for more information.
  • Creating catalog service domains in WebSphere Application Server
    With WebSphere DataPower XC10 Appliance, you define catalog service domains to establish connections with the catalog servers that are running on the appliance. Creating this configuration is required for dynamic cache data grids only.
Parent topic: Administering data grids
Related concepts:
Appliance topology: collectives, zones, and data grids
Related tasks:
Creating a collective
Administering data grids
Creating simple data grids
Creating session persistence to a data grid
Creating and modifying zones
Administering with the HTTP command interface