-
Notifications
You must be signed in to change notification settings - Fork 216
Realtime Synchronization
Whenever a user makes a change — for some definition of change — a patch is made and sent from the client to the server. The patch contains the change and when the change was made. This way if the user loses connection in the middle of some changes, patches are applied in very nearly always the correct order.
This is always well defined based on this diff-match-patch library even when patches are distributed from various computers with varying connections. That is to say, the final application of all patches is consistent based on timestamps and changes alone.
The core code for realtime sync in CoCalc is mainly found in syncstring.coffee. It builds on synctable.coffee, which provides an interface to rethinkdb, which supports writing when offline, syncing later, merging, etc.
This Wiki is for CoCalc.com.
A more structured documentation is the CoCalc User Manual.
For further questions, please contact us.