Re:Announcing Firepad — Our Open Source Collaborative Text E...
by yuchi on Tuesday April 09, 2013 @11:36AM
(#5518826)
That's exactly the whole point of Operational Transformation. It's the "algorithm" that powers Google Docs, and stores data as a sequence of transformations that can be applied ("can operate") on a previous document state to build a new one.
Re:Announcing Firepad — Our Open Source Collaborative Text E...
by therockhead on Tuesday April 09, 2013 @01:28PM
(#5519620)
Do you know of any JS OT framework that supports peer to peer?
Re:Announcing Firepad — Our Open Source Collaborative Text E...
by mikelehen on Tuesday April 09, 2013 @02:08PM
(#5519914)
I don't know the state of the project, but while researching OT stuff for Firepad, I came across https://github.com/sveith/jinfinote. It looks like a peer-to-peer OT implementation (I think it requires a server to set up the initial session, but after that, everything could be peer-to-peer [as implemented, the server just relays messages with no processing]).
Ever since Etherpad/Google Wave/Google Docs, though, OT has been consistently mangled into a hub-and-spoke design, where there's a server who keeps a canonical state, and the OT tie-breaking algorithm is always decided in the server's favor.
Used in this fashion, it's not much different (actually a bit higher-overhead than) just having the server arbitrarily accept and temporally-order input operations in a way it likes, and then send back a single overwriting transformation to all clients to move them from their last server-known commits to the new server-canonical commit. (In other words, what any multiplayer game's logic server does.)
[1] One major difference is that OT "commits" are referred to by their vector-clock, instead of by their SHA. Cryptographic hashes are nice, and would give OT even cooler properties if it could use them, but they're a bit too slow for something that gets regenerated with every character typed. CRCs might be fast enough, but in an actually-distributed peer-to-peer system you'll get real collisions fast.