Common Problems
Google Docs
Try This Problem Yourself
Practice with guided hints and real-time feedback
Understanding the Problem
Functional Requirements
- Users should be able to create new documents.
- Multiple users should be able to edit the same document concurrently.
- Users should be able to view each other's changes in real-time.
- Users should be able to see the cursor position and presence of other users.
- Sophisticated document structure. We'll assume a simple text editor.
- Permissions and collaboration levels (e.g. who has access to a document).
- Document history and versioning.
Non-Functional Requirements
Set Up
Planning the Approach
Defining the Core Entities
Defining the API
High-Level Design
1) Users should be able to create new documents.
2) Multiple users should be able to edit the same document concurrently.
Collaborative Edits Breakdown
3) Users should be able to view each other's changes in real-time.
When the Document is Loaded
When Updates Happen
4) Users should be able to see the cursor position and presence of other users.
Potential Deep Dives
1) How do we scale to millions of websocket connections?
2) How do we keep storage under control?
Some additional deep dives you might consider
What is Expected at Each Level?
Mid-level
Senior
Staff
References
Purchase Premium to Keep Reading
Unlock this article and so much more with Hello Interview Premium
Currently up to 20% off
Hello Interview Premium
On This Page
Understanding the Problem
Functional Requirements
Non-Functional Requirements
Set Up
Planning the Approach
Defining the Core Entities
Defining the API
High-Level Design
1) Users should be able to create new documents.
2) Multiple users should be able to edit the same document concurrently.
3) Users should be able to view each other's changes in real-time.
4) Users should be able to see the cursor position and presence of other users.
Potential Deep Dives
1) How do we scale to millions of websocket connections?
2) How do we keep storage under control?
Some additional deep dives you might consider
What is Expected at Each Level?
Mid-level
Senior
Staff
References
Prepping for interviews? Get the path to your next role
Everything you need to start preparing, totally free.
Personalized learning checklist
Free guided practice sessions
Track your progress across topics
AI tutor to answer your questions