An Efficient Distributed Obstruction-Free Compare-And-Swap Primitive
Many modern distributed systems make use of an atomic read-modify-write primitive. Such a primitive is usually built on top of a central sequencer or relies on the Paxos consensus algorithm. These services are however inherently non-scalable, and as a consequence they constitute the bottleneck of the system. In this paper, we present a novel algorithm to implement a compare-and-swap primitive using a distributed shared atomic memory. Our algorithm is obstruction-free and implementable in a purely asynchronous manner. It is built on top of splitter and (weak) adopt-commit objects, as well as a novel shared abstraction named racing that we present in detail. To assess the benefits of our approach, we present a prototype implementation on top of the Cassandra data store, and we compare it empirically to the Zookeeper coordination service.
View on arXiv