4 Replies Latest reply on Jan 18, 2011 4:42 AM by manik

    Are Paxos or Vector Clock frameworks available with Infinispan?

    jcmorgan08

      Are there any Paxos (http://en.wikipedia.org/wiki/Paxos_algorithm) and/or Vector Clock (http://en.wikipedia.org/wiki/Vector_clock) supporting frameworks that sit on top of Infinispan?

       

      In my project I require both types of distributed transactions on top of replicated (not distributed = JTA) databases.

        • 1. Are Paxos or Vector Clock frameworks available with Infinispan?
          manik

          Not that I know of.

          • 2. Are Paxos or Vector Clock frameworks available with Infinispan?
            mircea.markus

            Jonathan Morgan wrote:

             

            Are there any Paxos (http://en.wikipedia.org/wiki/Paxos_algorithm) and/or Vector Clock (http://en.wikipedia.org/wiki/Vector_clock) supporting frameworks that sit on top of Infinispan?

             

            Aren't these group communication protocols that would rather fall in jgroup's yard? Infinispan relies on jgroups for group communication.

            • 3. Are Paxos or Vector Clock frameworks available with Infinispan?
              jcmorgan08

              Not really.

               

              JGroups discovers nodes that wish to talk together.

               

              Paxos / Vector Clocks deal with the knotty question: what data is most up to date?

               

              e.g.: the case right now in Infinispan, as best as I can work out, is that on a replicated database, nodes joining the cluster will take the latest value known in the group...

               

              where N = node:

               

              N1, N2, N3: set(key="theKey", value="1")

              on any N: get("theKey") = "1"

               

              switch off N3, then set(key="theKey", value="2")

              switch off all nodes.

              switch on N3: get("theKey") = "1"

              switch on N1 and N2 to join N1.

              on any N: get("theKey") = "1"

               

              That might not be the desired result - "2" was a newer update.

               

              Infinispan seems primarily aimed at grid computing using an in mem Hashmap rather than being aimed at data consistency across split brain scenarios and/or data consistency during potential cluster "shutdown/switch on" scenarios. To enable data consistency in those scenarios requires implementation of a an appropriate algorithm on top of the Infinispan - and to enable max speed / max "uptime" requires different algorithms to be used according to the type of data being stored.

              • 4. Are Paxos or Vector Clock frameworks available with Infinispan?
                manik

                Jonathan Morgan wrote:

                 

                Infinispan seems primarily aimed at grid computing using an in mem Hashmap rather than being aimed at data consistency across split brain scenarios and/or data consistency during potential cluster "shutdown/switch on" scenarios. To enable data consistency in those scenarios requires implementation of a an appropriate algorithm on top of the Infinispan - and to enable max speed / max "uptime" requires different algorithms to be used according to the type of data being stored.

                Correct.  We don't necessarily deal with data consistency during split brains.  For the rest of the time, we are strongly consistent using a 2-phase commit protocol (exploring alternatives like atomic broadcast).  During node joins, we do something similar to a PAXOS quorum, making use of "uncertain" response types if a node's data happen to be in the process of rehashing at the time of a request. 

                 

                In future, we plan to deal with split brains more specifically and it may well be that we look at something like PAXOS for this.  If you are interested in helping out or contributing towards this, please join the infinispan-dev mail list.

                1 of 1 people found this helpful