Specification and Implementation of Replicated List: The Jupiter Protocol Revisited

Hengfeng Wei, Yu Huang, Jian Lu

TL;DR

This paper provides the first formal proof that the widely-used Jupiter protocol—the engine behind collaborative tools like Google Docs—actually meets modern correctness standards for replicated lists. By introducing a novel "n-ary ordered state space" data structure, the authors bridge the gap between local protocol implementations and global consistency requirements, solving a significant conjecture in distributed systems theory.

What Problem Does This Paper Address?

When multiple people edit a shared document simultaneously, the system treats the document as a replicated list. For decades, the gold standard for these systems was "convergence": if everyone stops typing, they should eventually see the same document. However, convergence doesn't account for the "weirdness" users might see while they are editing—like characters jumping around or flickering in inconsistent orders.

Recently, researchers proposed the strong/weak list specifications to define what constitutes a "sane" intermediate state. While newer protocols like RGA were proven to meet these specs, the industry-standard Jupiter protocol remained a question mark. The challenge was a "mismatch": Jupiter's internal logic uses local, 2D data structures that are efficient for a single client but make it nearly impossible to reason about the global state of the entire system.

Methods

The authors bridge this gap by designing CJupiter (Compact Jupiter). The core innovation is a new data structure called the n-ary ordered state space.

Standard Jupiter maintains $2n$ separate 2D state spaces for a system with $n$ clients. CJupiter, however, maintains a single, unified $n$-ary state space that encompasses every possible state any replica could ever reach.

  1. Equivalence Proof: The authors mathematically prove that CJupiter and the original Jupiter protocol are equivalent—they produce the exact same document contents under the same conditions.
  2. Global Reasoning: Because CJupiter’s $n$-ary space is "compact" (it stores all intermediate "by-product" states of operational transformations), it acts as a global map. The authors use this map to prove that any two states in the system are "pairwise compatible," which is the requirement for the weak list specification.

Datasets

Not discussed in the paper. As a theoretical work in formal methods and distributed systems, the paper relies on mathematical proofs and algorithmic analysis rather than empirical datasets or benchmarks.

Key Insights and Ideas

  • The "First" Rule: A critical insight is how the server orders operations. The authors show that the path along the "first" edges of the state space at the server follows a simple, predictable characterization based on the total order of operations.
  • Compactness as a Tool: By refusing to "optimize away" intermediate states (as standard Jupiter does at the client-side), CJupiter makes the protocol's underlying logic transparent. This "verbose" version is what finally allowed for a formal proof of correctness.
  • Compatibility is Key: The "aha moment" in the proof is showing that for any two document states, there are no two elements $a$ and $b$ such that $a$ comes before $b$ in one view but $b$ comes before $a$ in the other. This "no-flip" property is what makes the list "weakly" consistent.

Key Results

  • Conjecture Solved: The paper successfully proves the conjecture by Attiya et al. that the Jupiter protocol satisfies the weak list specification.
  • Protocol Unification: It demonstrates that despite the apparent complexity of managing $2n$ different state spaces, Jupiter is fundamentally navigating a single, coherent $n$-ary structure.
  • Formal Framework: The authors provide a rigorous roadmap for proving the correctness of other Operational Transformation (OT) based protocols, which have historically been notoriously difficult to verify and often prone to subtle bugs.

Limitations and Future Work

The authors focus on the weak list specification. While this is a major step, some protocols (like RGA) satisfy a "strong" specification that offers even tighter consistency guarantees. The paper does not explore whether Jupiter could be adapted to meet that higher bar.

For future work, the authors suggest exploring how to "algebraically manipulate" these $n$-ary ordered state spaces, potentially leading to even more efficient or robust collaborative editing algorithms.

Summary updated

BibTeX
@inproceedings{wei2018specification,
  author = {Hengfeng Wei and Yu Huang and Jian Lu},
  title = {{Specification and Implementation of Replicated List: The Jupiter Protocol Revisited}},
  booktitle = {Opodis},
  year = {2018},
  doi = {10.4230/lipics.opodis.2018.12},
}
Figure