Skip to main content
10 of 11
More content
Max N
  • 110
  • 8

To solve the question of how Google Docs works:

Here is a Blog post by the guy who designed the syncing system of gdocs: https://neil.fraser.name/writing/sync/

The link point to a detailed writeup of a syncing system that can work in lossy enviroment like Internet.

the entire sync architeture algorithm shown, looks complex but it just has many parts to it

The whole process is just a giant diff-match-Patch cycle between clients and the Server farm(as one Server is unable to handle all load), controlled and timed by the client.

More Details can be found in the linked document.

Answer

The adaptive Timing(7) part of the linked document explains that the system works in a Timerange, (as example given, at most every 1 s, minimal every 10 s) to get changes pulled to the client.

The main request volume driver is the adaptive Timing, where even at a very long timescales with an sufficent amount of documents in circulation, every connected client needs to check if any changes happen in the meantime on their documents. Every thing else is just bootstrapping this process(on the client) or handling the resulting packets( server side).

As always in system design, find the main request count driver and design your system for its handling and ignore the rest in the design calculations.

The rest is just the interface design and server side request handling and storage.

Max N
  • 110
  • 8