Evaluation of Google Docs’ Design

Let's look at how we’ll fulfill the non-functional requirements in a collaborative document editing system.

We’ve now explained the design and how it fulfills the functional requirements for a collaborative document editing service. This lesson will focus on how our design meets the non-functional requirements. In particular, we’ll focus on consistency, latency, scalability, and availability.

Consistency

We’ve looked at how we’ll achieve strong consistency for conflict resolution in a document through two technologies: operational transformation (OT) and Conflict-free Resolution Data Types (CRDTs). In addition, a time series database enables us to preserve the order of events. Once OT or CRDT has resolved any conflicts, the final result is saved in the database. This helps us achieve consistency in terms of individual operations.

We’re also interested in keeping the document state consistent across different servers in a data center. To replicate an updated state of a document within the same data center at the same time, we can use peer-to-peer protocols like Gossip protocolAlso referred to as epidemic protocol which is used for disseminating data across all nodes in a network to achieve consistency.. Not only will this strategy improve consistency, it will also improve availability.

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.