Building applications where multiple users simultaneously edit the same text document, whiteboard canvas, or design board (like Google Docs, Figma, Notion, or Linear) is one of the most intellectually challenging problems in systems design.
When two users concurrently insert or delete characters at the same position in a document without locking, naive character indexing causes divergence, scrambled text, and lost edits.
This module deconstructs the two foundational paradigms for concurrent collaboration:
- Operational Transformation (OT): Centralized coordination, transformation matrices, and server-side operation reordering (the Google Docs and Apache Wave architecture).
- Conflict-Free Replicated Data Types (CRDTs): Decentralized mathematical convergence, semilattices, causal trees, fractional indexing, and peer-to-peer offline sync (the Yjs, Automerge, and Figma architecture).
- Ephemera & Presence: Real-time cursor positions, user selection highlights, and WebSocket synchronization.