Topic
4 replies Latest Post - ‏2012-06-11T20:29:58Z by mpickering1
mpickering1
mpickering1
5 Posts
ACCEPTED ANSWER

Pinned topic Simple Grid TTL Backing Map Not Working

‏2012-06-06T18:17:56Z |
All,

We have an XC10 on our site and we need the capability to have objects that exceed their last access time or creation time by a defined threshold to be automatically removed from the appliance grid. This does not appear to be happening.

We are creating an ObjectGridConfiguration and overriding the BackingMap. It appears this is the only way to set a TTL on Simple Grids since there appears to be no configuration setting for it on the web admin console.

We set the TTL to 30 seconds for testing, add an object, sleep and then check to see if the key is still in the ObjectMap. It is. I've played with various settings and tried LAST_ACCESS_TIME and CREATION_TIME TTL policies to no avail. It looks like the XC10 code is not honoring the TTL policies.

We are on the WXS 7.1 API using ogclient.jar against a remote XC10 appliance. Does anyone have the magic code that causes the TTL evictor to actually execute. Without this capability, the XC10 is nearly a paperweight and I consider this basic cache functionality that should always work.

Any help appreciated.

Matt
Updated on 2012-06-11T20:29:58Z at 2012-06-11T20:29:58Z by mpickering1
  • gissel
    gissel
    6 Posts
    ACCEPTED ANSWER

    Re: Simple Grid TTL Backing Map Not Working

    ‏2012-06-06T21:07:38Z  in response to mpickering1
    You can get the behavior you want by using one the the defined dynamic maps for a simple grid. If you want to use last access time evictor for a grid name 'abc' then you can use the map named abc.LAT, for example.
    • mpickering1
      mpickering1
      5 Posts
      ACCEPTED ANSWER

      Re: Simple Grid TTL Backing Map Not Working

      ‏2012-06-07T19:44:25Z  in response to gissel
      The default backing maps aren't returned if I ask for them by name. It appears only the default backing map is configured.

      We are trying to override the BackingMap configuration with one of our own. Here's the code snippet:

      
      ObjectGrid grid = 
      
      null;   ObjectGridManager ogm = ObjectGridManagerFactory.getObjectGridManager(); ObjectGridConfiguration lclGridConfig = ObjectGridConfigFactory.createObjectGridConfiguration(
      "myConfiguredGrid"); 
      // XC10 default to the backing name the same as the grid name above BackingMapConfiguration bmc = ObjectGridConfigFactory.createBackingMapConfiguration(
      "myConfiguredGrid"); bmc.setTtlEvictorType(TTLType.LAST_ACCESS_TIME); bmc.setTimeToLive(30); bmc.setNumberOfBuckets(10); lclGridConfig.addBackingMapConfiguration(bmc);   
      // Connect to the XC10                                                       ClientClusterContext ccc = ogm.connect(this.cacheHost,getAdminClientConfig(),
      
      null);   
      // Create the BackingMap to override the default TTL = None behavior with a 30s expiration Map overrideMap = 
      
      new HashMap(); List overrideGridList = 
      
      new ArrayList(); overrideGridList.add(lclGridConfig); overrideMap.put(ccc.getClusterName(),overrideGridList); ogm.setOverrideObjectGridConfigurations(overrideMap); 
      // Retrieve the ObjectGrid client connection and return it. grid = ogm.getObjectGrid(ccc,
      "myConfiguredGrid");
      


      We see the TTL being set to 30 seconds but no evictions are taking place. We try setting it at the grid level and the ObjectMap to no avail.

      We are using a local client on our workstations to connect to a remote XC10. I suspect the no matter what we do locally, the remote XC10 default simple grid configuration takes over.

      Are we missing something in our coding or is there something we need to do on the appliance itself? This is incredibly frustrating and non-intuitive. Why this isn't a administrator configurable option on the XC10 management interface for a grid makes absolutely no sense.

      Any help appreciated.

      Matt
      • gissel
        gissel
        6 Posts
        ACCEPTED ANSWER

        Re: Simple Grid TTL Backing Map Not Working

        ‏2012-06-08T00:40:46Z  in response to mpickering1
        Hi Matt,

        There are multiple ways to achieve what you want but here is one way.

        If you've created a grid on the XC10 called "myConfiguredGrid" and you want to use a LAST_ACCESS_TIME as the evictor type then you should get a map named "myConfiguredGrid" then set the in the advanced attributes in grid as described here http://publib.boulder.ibm.com/infocenter/wdpxc/v2r0/topic/com.ibm.websphere.datapower.xc.doc/tdatagridttl.html?resultof=%22%4c%41%54%22%20%22%6c%61%74%22%20

        Time to live eviction: Last Access Time
        Evictor for map named simple1:
        Evict data from time to live maps after: X seconds

        Note that 30 seconds is way to aggressive
        • mpickering1
          mpickering1
          5 Posts
          ACCEPTED ANSWER

          Re: Simple Grid TTL Backing Map Not Working

          ‏2012-06-11T20:29:58Z  in response to gissel
          gissel,

          The 30s eviction time in my post is purely an example and for initial testing. Our actual desired time is 10 minutes (600s).

          I followed the provided link and although the page supplied indicates the options for the TTL evictor under "Advanced Options", no such drop-downs exist on our appliances. Our admins logged in and brought up the Simple Grid configurations and they aren't there. We tried creating a new grid and likewise, no options to set the evictors.

          We are running one 7199 and multiple 9235 appliances. Both are on firmware 2.0.0.2-cf41149.72431. It appears the feature we need is in firmware 2.0.0.3.

          Thanks everyone!

          Matt