English

The Art of the Fugue: Minimizing Interleaving in Collaborative Text Editing

Distributed, Parallel, and Cluster Computing 2025-10-22 v3 Data Structures and Algorithms

Abstract

Most existing algorithms for replicated lists, which are widely used in collaborative text editors, suffer from a problem: when two users concurrently insert text at the same position in the document, the merged outcome may interleave the inserted text passages, resulting in corrupted and potentially unreadable text. The problem has gone unnoticed for decades, and it affects both CRDTs and Operational Transformation. This paper defines maximal non-interleaving, our new correctness property for replicated lists. We introduce two related CRDT algorithms, Fugue and FugueMax, and prove that FugueMax satisfies maximal non-interleaving. We also implement our algorithms and demonstrate that Fugue offers performance comparable to state-of-the-art CRDT libraries for text editing.

Keywords

Cite

@article{arxiv.2305.00583,
  title  = {The Art of the Fugue: Minimizing Interleaving in Collaborative Text Editing},
  author = {Matthew Weidner and Martin Kleppmann},
  journal= {arXiv preprint arXiv:2305.00583},
  year   = {2025}
}

Comments

16 pages, 10 figures