Serializability for eventual consistency: criterion, analysis, and applications

Developing and reasoning about systems using eventually consistent data stores is a difficult challenge due to the presence of unexpected behaviors that do not occur under sequential consistency. A fundamental problem in this setting is to identify a correctness criterion that precisely captures intended application behaviors yet is generic enough to be applicable to a wide range of applications. In this paper, we present such a criterion. More precisely, we generalize conflict serializability to the setting of eventual consistency. Our generalization is based on a novel dependency model that incorporates two powerful algebraic properties: commutativity and absorption. These properties enable precise reasoning about programs that employ high-level replicated data types, common in modern systems. To apply our criterion in practice, we also developed a dynamic analysis algorithm and a tool that checks whether a given program execution is serializable. We performed a thorough experimental evaluation on two real-world use cases: debugging cloud-backed mobile applications and implementing clients of a popular eventually consistent key-value store. Our experimental results indicate that our criterion reveals harmful synchronization problems in applications, is more effective at finding them than prior approaches, and can be used for the development of practical, eventually consistent applications.

[1]  Leslie Lamport,et al.  How to Make a Multiprocessor Computer That Correctly Executes Multiprocess Programs , 2016, IEEE Transactions on Computers.

[2]  Marc Shapiro,et al.  A comprehensive study of Convergent and Commutative Replicated Data Types , 2011 .

[3]  Patrick E. O'Neil,et al.  Generalized isolation level definitions , 2000, Proceedings of 16th International Conference on Data Engineering (Cat. No.00CB37073).

[4]  Prashant Malik,et al.  Cassandra: a decentralized structured storage system , 2010, OPSR.

[5]  Hans-Arno Jacobsen,et al.  PNUTS: Yahoo!'s hosted data serving platform , 2008, Proc. VLDB Endow..

[6]  Michael J. Freedman,et al.  Don't settle for eventual: scalable causal consistency for wide-area storage with COPS , 2011, SOSP.

[7]  Mahadev Konar,et al.  ZooKeeper: Wait-free Coordination for Internet-scale Systems , 2010, USENIX ATC.

[8]  Marc Shapiro,et al.  Conflict-Free Replicated Data Types , 2011, SSS.

[9]  Raghunath Othayoth Nambiar,et al.  Transaction Processing Performance Council (TPC): State of the Council 2010 , 2010, TPCTC.

[10]  Anca Muscholl,et al.  Trace Theory , 2011, Encyclopedia of Parallel Computing.

[11]  Robert Thomas,et al.  Maintenance of duplicate databases , 1975, RFC.

[12]  Leslie Lamport,et al.  Time, clocks, and the ordering of events in a distributed system , 1978, CACM.

[13]  Ali Ghodsi,et al.  Coordination Avoidance in Database Systems , 2014, Proc. VLDB Endow..

[14]  Alexey Gotsman,et al.  A Framework for Transactional Consistency Models with Atomic Visibility , 2015, CONCUR.

[15]  Russell Brown,et al.  Riak DT map: a composable, convergent replicated dictionary , 2014, PaPEC '14.

[16]  Sebastian Burckhardt,et al.  Global Sequence Protocol: A Robust Abstraction for Replicated Shared State , 2015, ECOOP.

[17]  Dennis Shasha,et al.  Efficient and correct execution of parallel programs that share memory , 1988, TOPL.

[18]  Scott Owens,et al.  Reasoning about the Implementation of Concurrency Abstractions on x86-TSO , 2010, ECOOP.

[19]  Wolfgang Reisig,et al.  Petri Nets: Applications and Relationships to Other Models of Concurrency , 1986, Lecture Notes in Computer Science.

[20]  William E. Weihl,et al.  Commutativity-based concurrency control for abstract data types , 1988, [1988] Proceedings of the Twenty-First Annual Hawaii International Conference on System Sciences. Volume II: Software track.

[21]  Rusty Klophaus,et al.  Riak Core: building distributed applications without shared state , 2010, CUFP '10.

[22]  Marcos K. Aguilera,et al.  Transactional storage for geo-replicated systems , 2011, SOSP.

[23]  Frank Tip,et al.  Associating synchronization constraints with data in an object-oriented language , 2006, POPL '06.

[24]  Friedemann Mattern,et al.  Virtual Time and Global States of Distributed Systems , 2002 .

[25]  Sebastian Burckhardt,et al.  Replicated data types: specification, verification, optimality , 2014, POPL.

[26]  Nikolai Tillmann,et al.  TouchDevelop: programming cloud-connected mobile devices via touchscreen , 2011, Onward! 2011.

[27]  Werner Vogels,et al.  Dynamo: amazon's highly available key-value store , 2007, SOSP.

[28]  Dennis Shasha,et al.  Making snapshot isolation serializable , 2005, TODS.

[29]  Michael J. Freedman,et al.  Stronger Semantics for Low-Latency Geo-Replicated Storage , 2013, NSDI.

[30]  Bettina Kemme,et al.  How consistent is your cloud application? , 2012, SoCC '12.

[31]  Roland Meyer,et al.  Checking and Enforcing Robustness against TSO , 2013, ESOP.

[32]  Swaminathan Sivasubramanian,et al.  Amazon dynamoDB: a seamlessly scalable non-relational database service , 2012, SIGMOD Conference.

[33]  Nancy A. Lynch,et al.  Brewer's conjecture and the feasibility of consistent, available, partition-tolerant web services , 2002, SIGA.

[34]  Christos H. Papadimitriou,et al.  The serializability of concurrent database updates , 1979, JACM.

[35]  Alexey Gotsman,et al.  Robustness against Consistency Models with Atomic Visibility , 2016, CONCUR.

[36]  Annette Bieniusa,et al.  SwiftCloud: Fault-Tolerant Geo-Replication Integrated all the Way to the Client Machine , 2013, 2014 IEEE 33rd International Symposium on Reliable Distributed Systems Workshops.

[37]  Dimitar Dimitrov,et al.  Commutativity race detection , 2014, PLDI.