-
1. Re: Netty with infinispan - synchronous vs asynchronous
mircea.markus Dec 7, 2012 9:36 AM (in response to tomas.tunkl)I would like to use infinispan cache as session store. At first I am going to have max 5 nodes across the world, but when user connects to one node he will most likely stay there
If you're thinking about a geographically distributed cluster, starting with 5.2 we've added functionality to handle this exact scenario: https://docs.jboss.org/author/display/ISPN/Cross+site+replication
I am not sure about the consistent hash. Does it mean that data are going to stay local and also they are going to be replicated to num_copies of nodes?
You don't have the guarantee that the key will stay local, but that it will stay on some node and that there will be (numOwner-1) copies of the data on some other nodes. If you want to enforce the data to stay on the local node, you might want to consider the KeyAffinityService: https://docs.jboss.org/author/display/ISPN/Key+affinity+service
Also method to get information if value exists at all which would be cheep to use would be nice.
cache.getAdvancedCache().getDataContainer().contains(key);