[infinispan-dev] Eventual consistency
Erik Salter
esalter at bnivideo.com
Wed Mar 2 13:17:46 EST 2011
+1 - but I thought the "eagerLockSingleNode" option behaved in this manner already?
Erik
From: infinispan-dev-bounces at lists.jboss.org [mailto:infinispan-dev-bounces at lists.jboss.org] On Behalf Of Manik Surtani
Sent: Wednesday, March 02, 2011 12:43 PM
To: infinispan -Dev List
Subject: [infinispan-dev] Eventual consistency
As consistency models go, Infinispan is primarily strongly consistent (with 2-phase commit between data owners), with the exception of during a rehash where because of eventual consistency (inability to get a valid response to a remote GET) forces us to wait for more responses, a quorum if you like. Not dissimilar to PAXOS [1] in some ways.
I'm wondering whether, for the sake of performance, we should also offer a fully eventually consistent model? What I am thinking is that changes *always* occur only on the primary data owner. Single phase, no additional round trips, etc. The primary owner then asynchronously propagates changes to the other data owners. This would mean things run much faster in a stable cluster, and durability is maintained. However, during rehashes when keys are moved, the notion of the primary owner may change. So to deal with this, we could use vector clocks [2] to version each entry. Vector clocks allow us to "merge" state nicely in most cases, and in the case of reads, we'd flip back to a PAXOS style quorum during a rehash to get the most "correct" version.
In terms of implementation, almost all of this would only affect the DistributionInterceptor and the DistributionManager, so we could easily have eventually consistent flavours of these two components.
Thoughts?
Cheers
Manik
[1] http://en.wikipedia.org/wiki/Paxos_algorithm
[2] http://en.wikipedia.org/wiki/Vector_clock
--
Manik Surtani
manik at jboss.org<mailto:manik at jboss.org>
twitter.com/maniksurtani<http://twitter.com/maniksurtani>
Lead, Infinispan
http://www.infinispan.org
________________________________
The information contained in this message is legally privileged and confidential, and is intended for the individual or entity to whom it is addressed (or their designee). If this message is read by anyone other than the intended recipient, please be advised that distribution of this message, in any form, is strictly prohibited. If you have received this message in error, please notify the sender immediately and delete or destroy all copies of this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20110302/d3053edd/attachment-0001.html
More information about the infinispan-dev
mailing list