...

/

Design a Collaborative Document Editing Service / Google Docs

Design a Collaborative Document Editing Service / Google Docs

Learn to design a system similar to Google Docs.

Overview

Imagine two students are preparing a report on a project they’ve just completed. Since the students live apart, the first student asks the second student to start writing the report, and the first student will improve the received copy. Although quite motivated, the students soon understand that such a collaboration is disorganized. The following illustration shows how tedious the process can get.

Press + to interact
Problems arising when there’s no collaborative document editing service
Problems arising when there’s no collaborative document editing service

The scenario above is one example that leads to time wastage and frustration when users collaborate on a document by exchanging files with each other.

Google Docs

To combat the problem above, we can use an online collaborative document editing service like Google Docs. Some advantages of using an online document editing service instead of a desktop application are as follows:

  • Users can review and comment on a document while it’s being edited.

  • There are no special hardware specifications required to get the latest features. A machine that can run a browser will suffice.

  • It’s possible to work from any location.

  • Unlike local desktop editors, users can view long-term document history and restore an older version if need be.

  • The service is free of cost.

Other than Google docs, some popular online editing services include Etherpad, Microsoft Office 365, Slite, and many others.

Designing Google Docs

A collaborative document editing service can be designed in two ways:

  • It could be designed as a centralized facility using client-server architecture to provide document editing service to all users.
  • It could be designed using peer-to-peer technology to collaborate on a single document.

Most commercial solutions focus on client-service architecture to have finer control. Therefore, we’ll focus on designing a service using the client service architecture.

Note: According to a surveySee: https://www.statista.com/forecasts/1011649/frequency-of-using-google-docs-in-the-us, 64% of people use Google Docs for document editing at least once a week.

Requirements

Let’s look at the functional and non-functional requirements for designing a collaborative editing service.

Functional requirements

The activities a user will be able to perform using our collaborative document editing service are listed below:

  • Document collaboration: Multiple users should be able to edit a document simultaneously. Also, a large number of users should be able to view a document.
  • Conflict resolution: The system should push the edits done by one user to all the other collaborators. The system should also resolve conflicts between users if they’re editing the same portion of the document.
  • Suggestions: The user should get suggestions about completing frequently used words, phrases, and keywords in a document, as well as suggestions about fixing grammatical mistakes.
  • View count: Editors of the document should be able to see the view count of the document.
  • History: The user should be able to see the history of collaboration on the document.
...
Access this course and 1400+ top-rated courses and projects.