Design Problems/Collaborative Editor (Google Docs)

Collaborative Editor (Google Docs)

Hard
CRDTWebSocketConflict Resolution

High-Level Architecture

Rendering diagram...

Design a real-time collaborative document editing system where multiple users can simultaneously edit the same document with changes appearing instantly for all participants. The system must handle concurrent edits without conflicts and maintain a consistent document state.

Clarifying Questions

  • How many concurrent editors per document? (Up to 100)
  • What type of content? (Rich text with formatting, images, tables)
  • Latency for seeing another user's changes? (< 100ms for same region)
  • Offline editing support? (Yes, sync when back online)
  • Version history needed? (Yes, full revision history with rollback)