Conflict-Aware Replicated Data Types

02/23/2018
by   Nicholas V. Lewchenko, et al.
0

We introduce Conflict-Aware Replicated Data Types (CARDs). CARDs are significantly more expressive than Conflict-free Replicated Data Types (CRDTs) as they support operations that can conflict with each other. Introducing conflicting operations typically brings the need to block an operation in at least some executions, leading to potential inefficiencies, and difficulties in reasoning about correctness. The salient aspect of CARDs is that they allow ease of programming and reasoning about programs comparable to CRDTs, while enabling automated construction of optimal implementations that block an operation only when necessary. The key idea is to associate with each operation a *consistency guard* that relates the state of the replica to a global state (which is never computed). The consistency guards bring two advantages. First, a programmer developing an operation can rely only on the consistency guard, and in particular, does not need to consider the effects of other operations, allowing modular reasoning about operation correctness. We substantiate this claim by presenting simple Hoare-style proof rules for CARDs. Second, conflicts between operations can be algorithmically inferred by checking whether the effect of one operation preserves the consistency guard of another operation. We show how the conflict inference (at compile time) leads to implementations that are optimal. We empirically show that the inference needed to detect conflicts between operations is well within the scope of current SMT solvers.

READ FULL TEXT

Please sign up or login with your details

Forgot password? Click here to reset