Practice: Design Collaborative Document Editing System
Google‑Docs–style collaborative editor with real‑time multi‑cursor editing, presence, rich content, offline support, and strong permissions.
Build this system yourself on the canvas below. Add components, connect them, and run traffic simulations to see where your design holds up and where it breaks.
Functional requirements
- Real‑time multi‑cursor editing with low latency.
- Conflict resolution via OT or CRDT; per‑character granularity.
- Presence: online users, cursors, selections.
- Granular permissions: owner/editor/commenter/viewer; sharing links.
- Version history with diff/restore; operation log retention.
- Offline editing with background sync and conflict repair.
- Rich content: images, tables, embeds, comments, suggestions.
- Search across documents with relevance and filters.
Non-functional requirements
- Latency: realtime ops < 100 ms p95 E2E; steady state < 50 ms.
- Availability: 99.95%+; partial AZ failure must not drop editing.
- Consistency: strong for permissions; convergent for document state; read‑your‑writes for a user session.
- Durability: version history and audit logs retained with backups.
- Security: TLS 1.2+; signed share links; at‑rest encryption; scoped tokens.
- Resilience: timeouts, circuit breakers, retries/backoff, DLQs.
- Observability: traces/logs/metrics for op latency, room fanout, queue depth, and convergence errors.