Skip to main content

Google Docs

What is Google Docs?​

img_780.png img_781.png img_782.png

Requirements of Google Docs’ Design​

img_783.png img_784.png img_785.png img_786.png img_787.png img_788.png img_789.png img_790.png

Design of Google Docs​

img_791.png img_792.png img_793.png


Why should we use WebSockets instead of HTTP methods? Why are WebSockets optimal for this kind of communication?

img_794.png


The design above depicts a microservices architecture instead of a monolithic one. Why is that suitable here? img_795.png


What queuing algorithm is best suited for the operations queue in the design above? img_796.png

img_797.png


We’re implementing view counters through an asynchronous method, which means that the number of views of a document may be outdated. Could we use sharded counters or Redis counters to get effective results? img_798.png


The detailed design above doesn’t depict where the view counter data is saved. What would be suitable storage for the view counter, and what design changes will have to be made? img_799.png

Concurrency in Collaborative Editing​

img_800.png img_801.png img_802.png img_803.png img_804.png img_805.png img_806.png img_807.png img_808.png


Why can’t we use locks to synchronize between users? img_809.png


What happens if there are two users collaborating on a document and they have different Internet speeds? Which technology, OT or CRDT, is better suited for conflict resolution in such a case? img_810.png

Evaluation of Google Docs’ Design​

img_811.png


Why should we use strong consistency instead of eventual consistency for conflict resolution in a collaborative document editing service? img_812.png

img_813.png img_814.png img_815.png