Skip to main content

Real-time Collaboration (OT / CRDT)

Difficulty: Hard | Topic #28

What to Learn

Operational Transformation (OT) for collaborative text editing, Conflict-Free Replicated Data Types (CRDTs) as the modern alternative, cursor/selection sync, version vectors, merging concurrent edits.

Resources

Covered by Problems

ProblemDifficultyLink
Real-time Doc Collaboration (Google Docs)Hard
Online ChessHard

Key Concepts to Master

  • OT — transform an operation to account for concurrent remote operations
  • Convergence guarantee: all clients reach the same state regardless of operation order
  • CRDT — data structures where concurrent updates automatically resolve (counters, sets, sequences)
  • Vector clocks for tracking causality between operations
  • Cursor/selection broadcast as a separate low-latency channel