Design a real-time collaborative document editor similar to Google Docs. Multiple users can simultaneously edit the same document, see each other's cursors, and changes appear in real time (< 200ms latency between collaborators). The system supports 10 million documents with up to 50 concurrent editors per document.
In your 90-second answer, cover: - How you handle concurrent edits without conflicts (conflict resolution strategy) - Real-time synchronization protocol between clients and server - Document storage and version history - Cursor and presence tracking for collaborators
Constraints: edits must never be lost, the final document state must be identical for all users (strong eventual consistency), and the system must handle network partitions gracefully (offline editing with sync on reconnect).
How to approach it
- Hint 1
The core challenge is conflict resolution when two users edit the same region simultaneously. Research Operational Transformation (OT) or Conflict-free Replicated Data Types (CRDTs) -- these are the two main approaches.
- Hint 2
Use WebSockets for real-time bidirectional communication. Each document session needs a coordination point (a server or server process) that orders operations.
- Hint 3
For version history, store a chain of operations (event sourcing) rather than periodic full-document snapshots -- this gives you granular undo and exact replay.
Ready to answer it out loud?
Record your answer in 1:30 and Preptile scores it 1–10 with specifics — what landed, what you skipped, and what to say next time.
Practising needs an invite code. Join the waitlist and we’ll send you one.