Riak DT Map: A Composable, Convergent Replicated DictionaryRussell Brown, Sean Cribbs, Christopher Meiklejohn, Sam Elliott
April 2014 • Workshop Paper • Principles and Practice of Eventual Consistency ← Publications
Conflict-Free Replicated Data-Types (CRDTs) provide greater safety properties to eventually-consistent distributed systems without requiring synchronization. CRDTs ensure that concurrent, uncoordinated updates have deterministic outcomes via the properties of bounded join-semilattices.
We discuss the design of a new convergent (state-based) replicated data-type, the Map, as implemented by the Riak DT library and the Riak data store. Like traditional dictionary data structures, the Map associates keys with values, and provides operations to add, remove, and mutate entries. Unlike traditional dictionaries, all values in the Map data structure are also state-based CRDTs and updates to embedded values preserve their convergence semantics via lattice inflations that propagate upward to the top-level. Updates to the Map and its embedded values can also be applied atomically in batches. Metadata required for ensuring convergence is minimized in a manner similar to the optimized OR-set.
This design allows greater flexibility to application developers working with semi-structured data, while removing the need for the developer to design custom conflict-resolution routines for each class of application data. We also discuss the experimental validation of the data-type using stateful property-based tests with QuickCheck.