NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Serializability for eventual consistency: criterion, analysis, and applications

Lucas Brutschy, Dimitar Dimitrov, Peter Müller, Martin T. Vechev

TL;DR

This paper introduces a novel criterion for serializability in eventually consistent distributed systems, generalizing conflict serializability to handle high-level data types and weak consistency models. They developed a dynamic analysis tool that effectively detects harmful synchronization bugs in real-world applications, proving more precise and efficient than prior methods.

What Problem Does This Paper Address?

Modern distributed systems increasingly rely on eventually consistent data stores to achieve high scalability and availability. However, this relaxation of strong consistency introduces complex, unexpected behaviors that are difficult for developers to reason about and can lead to subtle bugs. A key challenge is to define a correctness criterion that is both computationally feasible and precise enough to capture intended application behaviors without ruling out valid ones. Existing criteria like conflict serializability are often too strict or don't handle the weak semantics of eventual consistency and high-level data types effectively. This paper aims to bridge this gap by providing a serializability criterion that works for eventual consistency and abstract data types, enabling developers to build correct and scalable applications.

Methods

The core of this work is a new serializability criterion that generalizes conflict serializability. This generalization is achieved by:

  • Novel Dependency Model: Introducing a dependency model that incorporates two key algebraic properties of operations: commutativity (order of operations doesn't matter) and absorption (one operation can mask the effect of another). This allows for more precise reasoning about how operations interact, especially with high-level data types.
  • Dependency Serialization Graph (DSG): Defining a directed graph where nodes represent transactions and edges represent dependencies (both direct and anti-dependencies) derived from visibility, arbitration, and program order. The criterion states that a history is serializable if and only if its DSG is acyclic.
  • Dynamic Analysis Tool: Developing a tool (ECRACER) that implements algorithms to check this criterion on program executions. The tool dynamically records operations, reconstructs visibility and arbitration, and then checks for cycles in the DSG. They provide both a generic and an optimized algorithm for this detection.
  • Targeted Serializability Checking: Allowing developers to specify certain operations or transactions that do not need to be serializable, making the analysis more practical by focusing on critical parts of the application.

Datasets

The paper evaluates their approach on two main application domains:

  • TOUCHDEVELOP Applications: They analyzed 33 small mobile applications built using the TOUCHDEVELOP framework, which uses weakly consistent cloud types.
  • TPC-C Benchmark: They implemented a version of the TPC-C benchmark using the eventually consistent data store RIAK.

No new benchmarks were introduced; instead, they applied their analysis to existing systems and a standard benchmark.

Key Insights and Ideas

  • Commutativity and Absorption are Crucial: The paper highlights that simply considering read/write conflicts is insufficient for eventual consistency. Precisely defining dependencies requires understanding how high-level operations commute and absorb each other.
  • Eventual Consistency Demands New Reasoning: Traditional serializability criteria are too strict or don't apply. The proposed criterion offers a way to reason about correctness in the face of weak consistency guarantees.
  • Targeted Checking is Practical: Requiring serializability for all operations is often too restrictive. The ability to focus the analysis on critical parts of an application is key to its practical utility.
  • Dynamic Analysis Finds Real Bugs: The experimental results show that their criterion detects harmful synchronization problems that lead to actual data inconsistencies, unlike less precise methods like commutativity races.
  • Trade-off Between Precision and Performance: The optimized algorithm offers a good balance, being computationally feasible while maintaining precision for many common data types.

Key Results

  • More Precise Detection: Their criterion detects 75% fewer serializability violations compared to commutativity races across 33 TOUCHDEVELOP applications.
  • No False Alarms: All detected serializability violations in their experiments corresponded to actual data inconsistencies.
  • Practical Utility: The analysis successfully guided developers in fixing bugs and building more correct and scalable applications, as demonstrated by the TPC-C case study where they iteratively refined an implementation to eliminate violations.
  • Performance Gains: The incrementally derived, serializable implementation of TPC-C showed significantly better scalability compared to a naive synchronized version.
  • Computational Feasibility: The generic algorithm has a polynomial time complexity (O(n⁴m)), and the optimized algorithm is even faster (O(max(nm, n²))), making it practical for analyzing real-world executions.

Limitations and Future Work

  • Limitations:
    • The dynamic analysis is limited to the specific execution traces observed. It cannot guarantee the absence of violations for all possible executions.
  • The optimized algorithm's precision can be reduced if data types exhibit "far-reaching absorption" that differs from standard absorption.
  • The analysis requires instrumentation of the client runtime, which adds overhead.
  • Future Work:
    • Extending the criterion to static analysis techniques.
  • Investigating restrictions on cycle types in dependency serialization graphs for specific settings.
  • Further exploring the trade-offs between different consistency models and their impact on serializability.

Summary updated

BibTeX
@inproceedings{brutschy2017serializability,
  author = {Lucas Brutschy and Dimitar Dimitrov and Peter Müller and Martin T. Vechev},
  title = {{Serializability for eventual consistency: criterion, analysis, and applications}},
  booktitle = {POPL},
  year = {2017},
  doi = {10.1145/3009837.3009895},
}
Figure