TomoLink
CompaniesPhonePeSystem DesignHow to Design Google Docs
System Design
Mediumhow-it-works

How to Design Google Docs

30 minsSystem DesignReal-time Collaboration
30 mins
1 sections
System Design, Real-time Collaboration

Overview

  • Clients send document editing operations to the WebSocket Server.
  • The real-time communication is handled by the WebSocket Server.
  • Documents operations are persisted in the Message Queue.
  • The File Operation Server consumes operations produced by clients and generates transformed operations using collaboration algorithms.
  • Three types of data are stored: file metadata, file content, and operations.

One of the biggest challenges is real-time conflict resolution. Common algorithms include:

  • Operational transformation (OT)
  • Differential Synchronization (DS)
  • Conflict-free replicated data type (CRDT)

Google Doc uses OT according to its Wikipedia page and CRDT is an active area of research for real-time concurrent editing.

How to Design Google Docs [Medium] | PhonePe System_design | TomoLink