HackerPapers

arXiv:2305.00583cs.DC

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

Matthew Weidner, Martin Kleppmann

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.

arXiv comments
16 pages, 10 figures
Journal reference
IEEE Transactions on Parallel and Distributed Systems, vol. 36, no. 11, pp. 2425-2437, Nov. 2025
DOI
doi:10.1109/TPDS.2025.3611880
Subjects
cs.DCDistributed, Parallel, and Cluster Computing cs.DSData Structures and Algorithms

On Hacker News

Linked by 2 identifiable commenters in 2 comments across 2 threads, from Dec 2023 to Aug 2025. Found in 4 HN submissions from May 2023 to Aug 2026. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments2 threads

  1. CRDT: Text Buffer 1 comment
    • This is a pretty good description of RGA (Replicated Growable Array). Which is a list & text CRDT that works pretty well in practice. Automerge used to use this algorithm for text editing, before moving across to FugueMax. This algorithm has another obscure downside: It has…

      josephgView on HNParent context

  2. Causal Trees 1 comment
    • In my experience, this depends a lot more on the implementation than the CRDT algorithm. If you implement Causal Trees directly (as a tree with one node per char), it will be tolerably fast but use a lot of memory + storage. If you instead group chars into "runs" of…

      mweidnerView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.