Operational Transformation library?

One of the ex-Wave engineers has released a Coffeescript implementation of its collaborative editing algorithm called ShareJS, now named ShareDB.


I'll summarize the solutions I found.

  • Operational Transformation: E.g.

    • Google Wave OT. The approach is based on the so called Jupiter approach.
    • ShareJs. Based on the same OT algorithm as Google Wave OT.
    • Coweb-jsoe. Based on COT - a very sophisticated OT approach that also supports p2p message propagation.
    • OpenCoweb. It leverages OpenCoweb-jsoe in order to provide a full-fledged Framework for a lot of similar problems.
    • OT.js is based on the operation-types of ShareJs.
    • DriveSDK. A very interesting API that can do a lot of things - e.g. collaboration on graphs.
    • SwellRT is a Fork of Apache Wave. Is is federated, and supports rich text.
  • Differential Synchronization:

    • Diff-Match-Patch from Neil Fraser.
    • MobWrite leverages the Diff-Match-Patch algorithm.
  • CRDT (Commutative Replicated Data Type):

    • There are a lot of different CRDT algorithms that allow the implementation of shared types. Some CRDTs work with P2P message propagation, some rely on client-server models
    • Yjs allows you to share arbitrary data types (RichText, Array, Hash Maps, .. extendable). Offline support and support for P2P communication protocols (there are modules for XMPP, Websockets, and WebRTC)
    • SwarmJS Client server shared database with offline support. Works well with React
    • Woot An implementation of the Woot CRDT
    • CRDT Another CRDT implementation
    • Automerge

I think that parts of Google Wave's OT implementation are Open Source (and more parts are coming).

I'm not sure if this is what you are looking for, but an alternative to OT is Differential Synchronization:

  • Google-Diff-Match-Patch - Diff, Match and Patch libraries for Plain Text: "The Diff Match and Patch libraries offer robust algorithms to perform the operations required for synchronizing plain text."
  • Google-MobWrite - Real-time Synchronization and Collaboration Service: "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." (Uses Google-Diff-Match-Patch.)