[Google Doc] Client-server Model

Could you help to clarify?

  1. How to decide the use change is completed and save as new version? User could add 1000 character in 3 hours, Will new version based on each new char, new paragraph, sleep time > x mins ( maybe it is better by gap/sleep time > certain period) ?
  2. Should the DB to store the document version use SQL DB?


是使用 SQL,保持各个副本间的高一致性。


Thanks for reply.

For new version in server, for the following few use cases, will it create 1 version or multiple version based on change frequecy?
User added 1000 letters,
– 5 letters each second,
— 1 letter each second
— 1 letter each minute
– 1 letter each 10 minute

Does it based on time gap to group the change to avoid too many version ? Or need only create the new version when user click save, or logout?



如果认为服务器处理速度很快,1s 会完成一次 round trip。那么,5letter/s 和 1letter/s 都会每秒发送(使得延迟保持在较低水平),这时候5个字母的更新会合并成一个版本。1 letter/m 或者 1 letter/10min 就会分别一分钟和十分钟一次。

不是的,Google Doc 是实时保存的。