Joining Forces Toward a Unified Account of LVars and Convergent Replicated Data Types

LVars—shared memory locations whose semantics are defined in terms of an application-specific lattice—offer a principled approach to deterministic-by-construction, shared-state parallel programming: writes to an LVar take the join of the old and new values with respect to the lattice, while reads from an LVar can observe only that its contents have crossed a specified “threshold” in the lattice. This interface guarantees that programs have a deterministic outcome, despite parallel execution and schedule nondeterminism. LVars have a close cousin in the distributed systems literature: convergent replicated data types (CvRDTs), which leverage lattice properties to guarantee that all replicas of a distributed object (for instance, in a distributed database) are eventually consistent. Unlike LVars, in which all updates are joins, CvRDTs allow updates that are inflationary with respect to the lattice but do not compute a join. Moreover, CvRDTs differ from LVars in that they allow intermediate states to be observed: if two replicas of an object are updated independently, reads of those replicas may disagree until a (least-upper-bound) merge operation takes place. Although CvRDTs and LVars were developed independently, LVars ensure determinism under parallel execution by leveraging the same lattice properties that CvRDTs use to ensure eventual consistency. Therefore, a sensible next research question is: how can we take inspiration from CvRDTs to improve the LVars model, and vice versa? In this paper, we take steps toward answering that question in both directions: we consider both how to extend CvRDTs with LVar-style threshold reads and how to extend LVars with CvRDT-style inflationary updates, and we advocate for the usefulness of these extensions.

[1]  Keshav Pingali,et al.  I-structures: data structures for parallel computing , 1986, Graph Reduction.

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

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

[4]  Werner Vogels,et al.  Building reliable distributed systems at a worldwide scale demands trade-offs between consistency and availability. , 2022 .

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

[6]  Sebastian Burckhardt,et al.  Semantics of Concurrent Revisions , 2011, ESOP.

[7]  Joseph M. Hellerstein,et al.  Consistency Analysis in Bloom: a CALM and Collected Approach , 2011, CIDR.

[8]  Sebastian Burckhardt,et al.  Prettier concurrency: purely functional concurrent revisions , 2011, Haskell.

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

[10]  David Maier,et al.  Logic and lattices for distributed programming , 2012, SoCC '12.

[11]  E. Brewer,et al.  CAP twelve years later: How the "rules" have changed , 2012, Computer.

[12]  Ryan Newton,et al.  LVars: lattice-based data structures for deterministic parallelism , 2013, FHPC '13.

[13]  Marcos K. Aguilera,et al.  Consistency-based service level agreements for cloud storage , 2013, SOSP.

[14]  Ryan Newton,et al.  Freeze after writing: quasi-deterministic parallel programming with LVars , 2014, POPL.

[15]  Ryan Newton,et al.  Taming the parallel effect zoo: extensible deterministic parallelism with LVish , 2014, PLDI.