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

Authors: Matthew Weidner, Joseph Gentle, Martin Kleppmann

IEEE Transactions on Parallel and Distributed Systems, vol. 36, no. 11, pp. 2425-2437, Nov. 2025
Submitted to arXiv on 30 Apr. 2023
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.

The papers around it, by date and closeness

Higher is closer to this paper; left is older. Lines join papers close to each other: groups of lines are sub-topics. Select a point to see why it is there. Back to the summary of this paper

How to read this map? Illustrated guide

Closest papers Prior work it builds on Papers that cite it

Papers around this one

Ranked by how close their title and abstract are to this paper’s. Select some to read them together.

Closest papers

  1. Very close Cited by this paper
    Interleaving anomalies in collaborative text editors
    Martin Kleppmann, Victor B. F. Gomes, Dominic P. Mulligan et al. · 2019 · PaPoC@EuroSys · cited 15 times · Not summarized yet
    Abstract

    Collaborative text editors allow two or more users to concurrently edit a shared document without merge conflicts. Such systems require an algorithm to provide convergence, ensuring all clients that have seen the same set of document edits are in the same state. Unfortunately convergence alone does not guarantee that a collaborative text editor is usable. Several published algorithms for collaborative text editing exhibit an undesirable anomaly in which concurrently inserted portions of text with a well-defined order may be randomly interleaved on a character-by-character basis, resulting in an unreadable jumble of letters. Although this anomaly appears to be known informally by some researc…

  2. Close Cites this paper
    Collaborative Text Editing with Eg-walker: Better, Faster, Smaller
    Joseph Gentle, Martin Kleppmann · 2024 · European Conference on Computer Systems · cited 9 times · Not summarized yet
    Abstract

    Collaborative text editing algorithms allow several users to concurrently modify a text file, and automatically merge concurrent edits into a consistent state. Existing algorithms fall in two categories: Operational Transformation (OT) algorithms are slow to merge files that have diverged substantially due to offline editing; CRDTs are slow to load and consume a lot of memory. We introduce Eg-walker, a collaboration algorithm for text that avoids these weaknesses. Compared to existing CRDTs, it consumes an order of magnitude less memory in the steady state, and loading a document from disk is orders of magnitude faster. Compared to OT, merging long-running branches is orders of magnitude fas…

  3. Close* Cited by this paper
    Specification and Complexity of Collaborative Text Editing
    H. Attiya, S. Burckhardt, Alexey Gotsman et al. · 2016 · ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing · cited 62 times · Not summarized yet
  4. Close Cites this paper
    Eg-walker: A Fast, Memory-Efficient Collaborative Editing Algorithm for Distributed Systems
    Praval Panwar · 2025 · 2025 IEEE 3rd International Conference on Control, Electronics and Computer Technology (ICCECT) · Not summarized yet
    Abstract

    Real-time collaboration features are vital in modern software, allowing multiple users to edit documents simultaneously while maintaining data integrity across devices. Traditional approaches like Operational Transformation (OT) and Conflict-free Replicated Data Types (CRDTs) each have limitations in handling large-scale concurrent editing and ensuring memory efficiency. In this paper, we introduce Eg-walker, a hybrid CRDT/OT algorithm that merges concurrent edits with optimal efficiency and reduced memory usage. Our evaluations show that Eg-walker can merge documents in milliseconds, requires significantly less memory than standard CRDTs, and operates effectively in peer-to-peer environment…

  5. Close Cites this paper
    ESBT: A Scalable and Deterministic Sequence CRDT for Distributed Collaborative Editing
    Moulay Driss Mechaoui, Abdessamad Imine · 2026 · arXiv.org · preprint, not peer reviewed · Not summarized yet
    Abstract

    Modern collaborative editing systems require efficient mechanisms for managing concurrent updates across distributed replicas. Sequence Conflict-free Replicated Data Types (CRDTs) have become the de facto standard for supporting decentralized collaboration; they enable decentralized replicas to apply operations in arbitrary order while converging to a common state. Although existing sequence CRDTs guarantee Strong Eventual Consistency (SEC), they often suffer from uncontrolled identifier growth and increasing memory consumption during long-running, highly concurrent editing sessions, which severely limits their scalability and performance. This paper presents the Extended Stern-Brocot Tree (…

  6. Close* Cited by this paper
    LSEQ: an adaptive structure for sequences in distributed collaborative editing
    Brice Nédelec, P. Molli, A. Mostéfaoui et al. · 2013 · ACM Symposium on Document Engineering · cited 67 times · Not summarized yet
  7. Close Cites this paper
    From Characters to Structure: Rethinking Real-Time Collaborative Programming Models
    Leon Freudenthaler, Bernhard Taufner, K. M. Göschka · 2025 · International Conference on Automated Software Engineering · cited 2 times · Not summarized yet
    Abstract

    Multiple programming tasks require synchronous collaboration between developers, giving rise to real-time collaborative programming tools that enable simultaneous editing of shared source code. However, most existing tools operate at the text level, propagating every keystroke–including syntactically invalid ones–without considering program structure. This results in excessive communication overhead, frequent propagation of build-breaking states, and poor synchronization. A major consequence is noticeable lag, especially under unstable network conditions, as collaborators are overwhelmed with unnecessary updates that disrupt their workflow and degrade the shared coding experience. In this pa…

  8. Close* Cited by this paper
    Tombstone Transformation Functions for Ensuring Consistency in Collaborative Editing Systems
    G. Oster, P. Molli, Pascal Urso et al. · 2006 · International Conference on Collaborative Computing · cited 113 times · Not summarized yet

Prior work it builds on

  1. Related*
    Data consistency for P2P collaborative editing
    G. Oster, Pascal Urso, P. Molli et al. · 2006 · Conference on Computer Supported Cooperative Work · cited 270 times · Not summarized yet
  2. Related
    Moving elements in list CRDTs
    Martin Kleppmann · 2020 · PaPoC@EuroSys · cited 17 times · Not summarized yet
    Abstract

    Conflict-free Replicated Data Types (CRDTs) for lists allow multiple users to concurrently insert and delete elements in a shared list object. However, existing algorithms behave poorly when users concurrently move list elements to a new position (i.e. reorder the elements in the list). We demonstrate the need for such a move operation, and describe an algorithm that extends a list CRDT with an explicit move operation. Our algorithm can be used in conjunction with any existing list CRDT algorithm. In addition to moving a single list element, we also discuss the open problem of moving ranges of elements.

  3. Related*
    Near Real-Time Peer-to-Peer Shared Editing on Extensible Data Types
    Petru Nicolaescu, Kevin Jahns, M. Derntl et al. · 2016 · Group · cited 53 times · Not summarized yet
  4. Related
    Real Differences between OT and CRDT for Co-Editors
    Cheng-Zheng Sun, David Sun, Agustina et al. · 2018 · arXiv.org · preprint, not peer reviewed · cited 5 times · Not summarized yet
    Abstract

    OT (Operational Transformation) was invented for supporting real-time co-editors in the late 1980s and has evolved to become a core technique used in today's working co-editors and adopted in major industrial products. CRDT (Commutative Replicated Data Type) for co-editors was first proposed around 2006, under the name of WOOT (WithOut Operational Transformation). Follow-up CRDT variations are commonly labeled as "post-OT" techniques capable of making concurrent operations natively commutative, and have made broad claims of superiority over OT solutions, in terms of correctness, time and space complexity, simplicity, etc. Over one decade later, however, CRDT solutions are rarely found in wor…

  5. Related
    Real Differences between OT and CRDT in Correctness and Complexity for Consistency Maintenance in Co-Editors
    David Sun, Cheng-Zheng Sun, Agustina Ng et al. · 2019 · Proc. ACM Hum. Comput. Interact. · cited 28 times · Not summarized yet
    Abstract

    OT (Operational Transformation) was invented for supporting real-time co-editors in the late 1980s and has evolved to become core techniques widely used in today's working co-editors and adopted in industrial products. CRDT (Commutative Replicated Data Type) for co-editors was first proposed around 2006, under the name of WOOT (WithOut Operational Transformation). Follow-up CRDT variations are commonly labeled as "post-OT" techniques capable of making concurrent operations natively commutative in co-editors. On top of that, CRDT solutions have made broad claims of superiority over OT solutions, and often portrayed OT as an incorrect and inefficient technique. Over one decade later, however, …

Papers that cite it

  1. Related
    Semantic-Aware Replicated Data Types for Improved Conflict Resolution in Near-Synchronous Code Collaboration
    Leon Freudenthaler · 2025 · 2025 IEEE/ACM 47th International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · Not summarized yet
    Abstract

    This dissertation addresses the limitations of convergence in near-synchronous code collaboration. Current techniques predominantly rely on string-based synchronization, which often results in conflict resolution that fails to address the underlying structural, syntactic, or semantic context of the code. This work proposes a semantic-aware approach that explores different levels of granularity in replicated data types (RDT) to overcome these limitations while enabling near-synchronous visualization of code evolution, enhancing interactive programming environments. The main contributions include: (1) a classification of conflict scenarios and intent-preserving code merging behavior, (2) a nov…

  2. Related
    Approaches to Conflict-free Replicated Data Types
    Paulo Sérgio Almeida · 2023 · ACM Computing Surveys · cited 32 times · Not summarized yet
    Abstract

    Conflict-free Replicated Data Types (CRDTs) allow optimistic replication in a principled way. Different replicas can proceed independently, being available even under network partitions and always converging deterministically: Replicas that have received the same updates will have equivalent state, even if received in different orders. After a historical tour of the evolution from sequential data types to CRDTs, we present in detail the two main approaches to CRDTs, operation-based and state-based, including two important variations, the pure operation-based and the delta-state based. Intended for prospective CRDT researchers and designers, this article provides solid coverage of the essenti…

  3. Related
    Collaborative Support for Software Product Line Modeling and Project Management: A Generative AI-Enhanced Approach with Real-Time Synchronization
    Oscar Aguayo, Juan Lagos-Obando, Samuel Sepúlveda et al. · 2026 · Applied Sciences · cited 1 time · Not summarized yet
    Abstract

    Background: Software Product Line (SPL) engineering relies on coordinated work over variability-intensive artifacts, yet existing SPL tools provide limited support for synchronized multi-user modeling and project-level collaboration. Objective: This paper presents a collaborative extension of VariaMos that combines synchronization based on Conflict-free Replicated Data Types (CRDTs), awareness and governance mechanisms, and integrated artificial intelligence (AI)-assisted model authoring. Method: Following Wieringa’s Design Science methodology, the treatment was designed, implemented, and evaluated through unit and functional tests, collaborative proof-of-concept scenarios, controlled load e…

  4. Related
    CRDV: Conflict-free Replicated Data Views
    Nuno Faria, José Pereira · 2025 · Proc. ACM Manag. Data · cited 4 times · Not summarized yet
    Abstract

    There are now multiple proposals for Conflict-free Replicated Data Types (CRDTs) in SQL databases aimed at distributed systems. Some, such as ElectricSQL, provide only relational tables as convergent replicated maps, but this omits semantics that would be useful for merging updates. Others, such as Pg\_crdt, provide access to a rich library of encapsulated column types. However, this puts merge and query processing outside the scope of the query optimizer and restricts the ability of an administrator to influence access paths with materialization and indexes. Our proposal, CRDV, overcomes this challenge by using two layers implemented as SQL views: The first provides a replicated relational …

  5. Related
    DevSync: Cloud-Based Real-Time Code Collaboration Platform
    D. Ragunath, S. Raj, I. Jackson et al. · 2025 · 2025 IEEE First International Conference on Innovations in Engineering and Next-Generation Technologies for Sustainabili · Not summarized yet
    Abstract

    The trend of distributed development shows the weakness of traditional local IDEs in collaboration, homing setup, and secure expandability. DevSync provides a solution to these problems-a web-based collaborative integrated development environment (IDE) with the feel of VS Code and real-time collaboration. It uses the CRDTs for conflict-free synchronization, and Socket. IO for real-time communication and AWS Cognito coupled with S3 for secure authentication and storage. The system integrates a Next. js frontend, Monaco Editor, and a backend w/ Node. js/Express backend and a sandboxed execution engine. Optimized for low-latency, scalable real-time collaboration, DevSync composes an effective r…

How are these papers found?

We compare the title and abstract of this paper with those of every paper summarized on this site, and with the papers Semantic Scholar recommends, those it cites and those citing it (for a much-cited paper, its most recent citations and, from OpenAlex, the most cited ones). Among the prior work and the follow-ups, the papers that use each other in depth, a method it uses and the much-cited follow-ups come a little higher. The levels (very close, close, related) come from the similarity of the texts, not from a judgment of quality; * marks a paper without an abstract, compared by its title. The sentence under a paper is written by an AI from the two abstracts: check it in the papers. A paper marked not relevant by three readers leaves the list.

Updated on 6 November 2026.

The illustrated guide to the papers around a paper