Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Operational Transformation library?

I'm looking for a library that would allow me to synchronize text in real-time between multiple users (ala Google Docs).

I've stumbled upon Operational Transformation, which seems to fit my needs. Having said that, I understand the gist of OT, but not the math nor implementation of OT.

Thus, I was wondering if there was a drag'n'drop Javascript library that would hook into a text area, generate the transforms, then allow me to apply those transformations onto another client?

(I've gotten the Etherpad source, but I can't make head or tails out of it. If anyone could point out how to leverage on Etherpad's OT implementation, that'll be great too!)

like image 308
gamers2000 Avatar asked Jan 11 '10 16:01

gamers2000


People also ask

What is the purpose of operational transformation?

Operational transformation (OT) is a technology for supporting a range of collaboration functionalities in advanced collaborative software systems. OT was originally invented for consistency maintenance and concurrency control in collaborative editing of plain text documents.

Does Google Docs use operational transformation?

In Google Docs, the first problem is handled by operational transformation and the second problem is handled by the collaboration protocol, which is the subject of this post. To open a Google document, you need code running in two places: your browser and our servers.


2 Answers

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.)
like image 173
Jörg W Mittag Avatar answered Sep 18 '22 05:09

Jörg W Mittag


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

like image 41
hawkeye Avatar answered Sep 20 '22 05:09

hawkeye