Search

3/21/2009

Theory - google-mobwrite - How MobWrite works. - Google Code

google-mobwrite - Google Code

MobWrite converts forms and web applications into collaborative environments. Create a simple single-user system, add one line of JavaScript, and instantly get a collaborative system.

Theory - google-mobwrite - How MobWrite works. - Google Code
Differential synchronization - MobWrite is a symmetrical system where the client and the server run exactly the same algorithms, sharing the work in keeping everyone in sync. Differential synchronization provides a fault-tolerant system that allows conflicts to be resolved automatically on a best-effort basis.

Diff, Match and Patch - At the core of both the client and the server is an efficient library that identifies local changes then merges remote changes into the local content. The matching algorithms are also used to restore the cursor or selection after remote changes are received.

Communication protocol - Synchronizations occur every few seconds, with the frequency automatically increasing during periods of activity and decreasing when idle. Data is transmitted across the web using Ajax requests, formatted to a custom protocol. This protocol is intended to be simple and flexible enough that new clients or servers may be created which integrate cleanly with MobWrite.

Text vs. Numbers - Two different conflict resolution strategies are used. Conflicting text changes are merged gently, attempting to incorporate the intention of all parties. While there exist no-win scenarios, MobWrite does the best job it can, with the understanding that an imperfect merge done in real time will be seen immediately by all affected parties. This is distinct from numeric data and enumerated types which are simply overwritten with the last selected value.

沒有留言: