2 Replies Latest reply on Dec 17, 2010 10:31 AM by Manik Surtani

    Use-case to have a distributed mode cache with with FileStore

    Abhishek Gupta Newbie


         I have a use-case where we need to


      * have a large amount of data in memory ( approximately 10 GB)

      * have this distributed over a number of nodes. Say 10 nodes; so 1 GB per node. (I'm  not taking into account data duplication yet, so num_copies=1)

      * have them read from a commmon JDBC cacheloader. (For now, its going to be read-only data)


      There are more requirements but for now I want to be able to achieve this. This seems like a very simple use-case but could not find clarity in the docs about achieving this. Please feel free to point me to relevant docs.


      Here's what I have tried and seen so far -


      * Set up a cache in distributed mode with a loader that has 100 entries worth of data

      * I'm capping the size of the cache based on the number of entries. The only way I've found I can do this is by setting an eviction policy (as per http://docs.jboss.org/infinispan/4.0/apidocs/config.html#ce_default_eviction). Please let me know if there is another way. I've set the maxEntries="50" in each of the two nodes.

      * When I start the first node, it loads 40 entries (not sure why - I set maxEntries="50"). I check this by using cache.entrySet() (per http://docs.jboss.org/infinispan/4.1/apidocs/org/infinispan/Cache.html#entrySet%28%29 it should give the local view). Why is this the case?

      * When I start the seconds node it loads a random number of entries locally. Whatever entries B loads has no impact on the entries of A atall.


      All I need is, that 100% of the data in my store (100 entries) get loaded across the number of nodes in my cluster. If there are two nodes then 50 each, if 4 nodes then 25 each.


      I'd apprecaite help with this. If you can point me a simple example with config files that would be very helpful.