Question #50 of 60•Protocols•Hard• ~3 min read

How do Operational Transformation (OT) and CRDTs power Real-Time Collaborative Editors?

Executive Takeaway

Compare Operational Transformation (Google Docs) and Conflict-Free Replicated Data Types (Figma / Notion) for concurrent state convergence.

Architectural Breakdown & AnalysisFAANG Aligned

Real-time collaborative editors allow multiple users to edit the exact same document concurrently without conflicts or lost edits.

1. Operational Transformation (OT: Google Docs)

  • Relies on a central server to transform and sequence edit operations.
  • If User A inserts "X" at index 2 while User B deletes at index 1, the server transforms User A's operation index to 1 before broadcasting.
  • Pros: Minimal memory footprint per operation.
  • Cons: Extremely complex server transformation algorithms.

2. CRDTs (Conflict-Free Replicated Data Types: Figma / Notion)

  • Mathematical data structures that converge automatically to the exact same state across peer nodes without requiring a central server.
  • Pros: Supports offline editing and peer-to-peer synchronization natively.
  • Cons: Higher memory overhead due to unique operation identifier tombstones.
NOTE — Industry Trend

Modern collaborative tools (Notion, Figma, Automerge, Yjs) increasingly choose CRDTs over OT due to offline-first capabilities.

Key Architectural Comparison

Collaboration AlgorithmCentral Sequencer Required?Conflict Resolution MechanismMemory OverheadIndustry Adoption
Operational Transformation (OT)Yes (Single server linearizes all operations).Positional transformation matrices.Low (Stores only current document state).Google Docs, Etherpad.
CRDT (Conflict-Free Replicated)No (Peer-to-peer / decentralized friendly).Mathematically commutative immutable IDs.High (Requires tombstones for deletions).Figma, Apple Notes, Yjs, Automerge.
Previous QuestionWhy is Shared Database between microservices an anti-pattern (Database-per-Service)?Next Question How do you design a high-throughput distributed URL Shortener (TinyURL) at scale?

Continue Learning on Being SDE

Explore deep-dive system architecture modules, low-level object-oriented designs, and interview cheat sheets.