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

Authors: Matthew Weidner, Joseph Gentle, Martin Kleppmann

32 pages, 9 figures
License: CC BY 4.0

Abstract: 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 presents Fugue, the first algorithm that guarantees maximal non-interleaving, our new correctness property for replicated lists. We present two variants of the Fugue algorithm, one based on a tree and the other based on a list, and prove that they are semantically equivalent. We also implement Fugue and demonstrate that it offers performance comparable to state-of-the-art CRDT libraries for text editing.

Submitted to arXiv on 30 Apr. 2023

Explore the paper tree

Click on the tree nodes to be redirected to a given paper and access their summaries and virtual assistant

Also access our AI generated Summaries, or ask questions about this paper to our AI assistant.

Look for similar papers (in beta version)

By clicking on the button above, our algorithm will scan all papers in our database to find the closest based on the contents of the full papers and not just on metadata. Please note that it only works for papers that we have generated summaries for and you can rerun it from time to time to get a more accurate result while our database grows.