Backend system design · about 45 minutes
Collaborative document editor
Design the backend of a document editor in which several people type in the same document at the same time. Each person sees the changes of the other people in less than a second, with their cursors and names. No edit is lost, all people get the same text in the end, and each document keeps its version history.
Ask first
- How many documents are open at one time, and how many people edit one document at once?
- Is the content plain text, rich text, or also tables and images?
- Must a person be able to edit offline for a long time and merge the changes later?
- How fast must an edit of one person show on the screens of the other people?
- Do you need version history, comments and suggestions, or only the live text?
The outline
Write your own outline for each part first.
The strong answer, the pitfalls and the follow-ups opens with a year in the app. What a year includes