[jboss-user] [JBoss Cache: Core Edition] - Re: Should be able to use ClusteredCacheLoader with CacheMod

lovelyliatroim do-not-reply at jboss.com
Wed Apr 30 05:34:53 EDT 2008


Ok correct me of im wrong here, using a clustered cache loader with replication set to replicate changes is useless because all the values will be replicated anyways to other members. It would only make sense to use it in this mode if you could configure CCL to point to a different cluster which i dont think you can do at the moment.

So is it fair to say that CCL only makes sense to use when replicating in INVALIDATION mode??

anonymous wrote : 
  | Now if the cluster is not replicated, nodes A, B and C would have different state, potentially using the same Fqns. And using a CCL here could result in meaningless state retrieval. 
I would say it really depends on your scenario here, if i had static data that doesnt change then i wouldnt really worry about the above happening but i do see that in other scenario´s it would be a problem.

Another question just on how CCL works. Say i have 2 nodes, A,B. Data items have a life expectancy of 15 mins on each node. So after 15 mins the data item is evicted and if a request comes in and data item isnt there we retrieve from source.
Each of the nodes are configured to use CCL and every entry made in a cache is flagged as a local entry via 
treeCache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
  | 		treeCache.put(nodePath,map);
  | 

Now take sequence of events as follows
1. Node A receives request for data item X
2. Data Item X, not there, retrieve from source and place in cache.
3. 14 mins later Node B is asked for data item X,it doesnt have it but node A does and is replicated on B via CCL.
4. Data Item X is removed from the cache on node A because its 15 minute lifetime expectancy is up.
5. Node A receives request for data item X,it doesnt have it but node B does. data Item is replicated on to A via CCL. So actually data item X is older than 15 minutes in reality. 

Can the above scenario happen? Will node A keep data Item X for another 15 mins and also have the possibility of the cycle continuing or does NODE B when it receives data Item X know that it must be evicted in 1 minutes time??

So does jboss cache replicate the timestamp of a data item if it is replicated from one node to another via CCL??

if not as a possible solution to achieve this could one write their own eviction policy and use an internal ID(member variable) that is transferred from node to node?

Thanks Manik,
LL

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147765#4147765

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147765




More information about the jboss-user mailing list