| Simple OT algorithms do work a lot better with a centralized server. With a centralized server, you can consider every resolution as happening between 2 nodes (server and client). This means transform / catchup is as simple as a for loop. In contrast, in decentralized context OT code needs to support Transform Property 2[1] in order to converge correctly in all cases. TP2 dramatically complicates the OT implementation, and you need a much more complicated resolution algorithm to merge arbitrary changes between nodes. For text, this means you need: - Tombstones (or something like it) - eg https://github.com/josephg/TP2/blob/master/src/text.coffee - Either an operation prune function (anti-transform) or full history, forever. - A resolution algorithm that can flatten DAGs of operations into a transformed list. This stuff gets really hairy, and hard to implement efficiently. This is my attempt from a few years ago. Its correct, but super slow: https://github.com/josephg/tp2stuff/blob/master/node3.coffee Implementing high performance OT with centralized servers is easy. Implementing OT in a decentralized network is hard to do correctly, and much harder to implement in a highly performant way. For decentralized systems, CRDTs are a much better approach imo. [1] https://en.wikipedia.org/wiki/Operational_transformation#Tra... |
[1] https://dl.acm.org/citation.cfm?id=2914099