1 Reply Latest reply on Dec 7, 2012 9:36 AM by Mircea Markus

    Netty with infinispan - synchronous vs asynchronous

    Tomas Tunkl Newbie

      Hi,

       

      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. But It can happen that he can switch to another. So ideal solution would be to have one replica of data on node where user communicates, but other nodes know that such key exists and where to find data. I understand that distribution mode is ideal for this with benefit that data can be backed up by another node. I have a question about this:

       

      • 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?

       

      Now about the implementation of retrieve from cache. I am using netty framework and I need to be able to decided whether retrieve of value is going to take some time, or whether value is placed in local memory. Because I have to decide whether I need to run retrieve and the whole logic in separate thread or in worker thread, but this thread cannot be blocked by loading. I was trying to find method which could tell me such thing but I havent found anything. For example ehCache has method isElementInMemory which I can use to decide. Also method to get information if value exists at all which would be cheep to use would be nice.

       

      Thank you for your help.