3 Replies Latest reply on Mar 23, 2012 7:06 AM by galder.zamarreno

    infinispan Spring3.1  Integration clustering?

    chavarao

      I am trying to evaluate infinispan and terracotta.

       

       

      Here are my requirements and questions?

       

      We have mulitple apps running on different tomcat/weblogic servers. 

       

      We use spring 3.1 and cache abstraction.

       

      I want to use centralized caching for all webapps instead having local cache in each JVM. When the data is changed in one all other should be refreshed or notifed.

       

      I tried to follow infinispan documentation and not sure I get this right?

       

      Where the cache data is stored when I disable L1 cache and use replicated distribution cluster mode?

       

      When do I need Cache Server?

       

      When do I need CacheLoader/CacheStore? I want to my app loads the data from db if its not in cache and Spring CacheInterecptor put in cache.

       

      I  have followed documenaton and created application context with

       

         <cache:annotation-driven/>

          <infinispan:embedded-cache-manager configuration="classpath:cluster.xml"/>

       

      I started my sample test program in two different console on my local machine  . I can see that cache works each one seperately

      but when I put on one and second one is not recognizing it? It doesn't look like one node knows another?

       

      Also I see a lot of messages like this ?

       

      WARN org.jgroups.protocols.pbcast.NAKACK  - lmachine-55800: dropped message 8 from lmachine-56414 (sender not in table [lmachine-55800]), view=[lmachine-55800|0] [lmachine-55800]

       

       

      Thanks

        • 1. Re: infinispan Spring3.1  Integration clustering?
          galder.zamarreno

          Where the cache data is stored when I disable L1 cache and use replicated distribution cluster mode?

          In that case, all nodes store the data. Works well with small clusters or small dataset (i.e. metadata)

           

          When do I need Cache Server?

          You can find a good comparison between P2P and client/server in https://docs.jboss.org/author/x/2AU5

          When do I need CacheLoader/CacheStore? I want to my app loads the data from db if its not in cache and Spring CacheInterecptor put in cache.

          Two situations: to offload data in memory to backend persistence, i.e. passivated data, and when needed, return it back to memory. Or when you want to provide a permanent storage for your data. Based on what you said, don't think you need one.

           

          Seems like you have a clustering issue. I'd suggest you take the JGroups stack and run the tests in http://www.jgroups.org/manual/html/ch02.html to get clustering working. If UDP is problematic, try with TCP.

          • 2. Re: infinispan Spring3.1  Integration clustering?
            chavarao

            Thank you Galder.

             

            I would like to not to store the cache data in each instance of JVM  and want centralized cache?  Otherwise I need to increase memory.

             

            If we use distributed mode  where data is going to be memory ?

             

            If I disabled the L1 so its not in local cache  that means its not in each JVM.

             

            I am able to setup replciated cache , it was spring  configuration issue.

             

             

             

            Thanks

             

             

            • 3. Re: infinispan Spring3.1  Integration clustering?
              galder.zamarreno

              Then use a cache server. You can set a bunch of servers to have the data in distributed mode. The data would be in memory.

               

              L1 is only about trying to speed up reads, but with cache servers, this is not important because clients can locate which server has some data.