2 Replies Latest reply on Aug 5, 2010 10:18 AM by Shane Johnson

    Fetch In Memory State

    Shane Johnson Novice

      It appears that this flag is used for two different purposes.


      1. Can the cache fetch state from another node?
      2. Can the cache provide state to another node?


      The flag has to be set to true on all nodes so that one can become a 'server' while another can become a 'client'. You can't have 1 node allowed to generate state while having another node only consume it.


      Temporarily we have modified the code so that the StateTransferManagerImpl is started regardless of the current flag. In addition, we assume every node can consume content. Finally, we have relegated the flag to merely determining if a node can provide state or not.



      It seems that there should really be two different flags:


      • retrieveInMemoryState (consume)
      • generateInMemoryState (provide)


      This would allow us to specify which nodes can provide it and which can only consume it. For example, we may set up a 4 node cluster such that 2 nodes are 'masters' and can provide state while all 4 nodes can consume state.



        • 1. Re: Fetch In Memory State
          Galder Zamarreño Master

          First of all, I'm not sure what flag you're talking about here. In the context of Infinispan, when we talk about flags, we normally refer to http://docs.jboss.org/infinispan/4.1/apidocs/org/infinispan/context/Flag.html


          I assume you're refering to some kind of configuration option rather than a flag as per the definition above.


          It'll be interesting to hear other people's thoughts but personally, I don't like the idea you suggest cos it moves away from the peer-to-peer architecture where all peers are equals to each other within a cluster, all of them having the same config.


          For an scenario where you wanna separate state providers from state consumers, I'd create two clusters, one with providers and the other with consumers and you could connect between them via RemoteCacheStore+HotRod.

          • 2. Re: Fetch In Memory State
            Shane Johnson Novice

            I was referring to the 'fetchInMemoryState' attribute of the 'stateRetrieval' element in the Infinispan configuration.

            Perhaps a better way to say it is that we would like to see 2 attributes (generateInMemoryState / retrieveInMemoryState) on this element. It may be that we have a unique use case. In particular, the state transfer creates a coupling between nodes that we would like to limit.

            Interesting about 2 clusters. I remember you mentioned that in a previous discussion on Hot Rod usage.