Re:Real-Time Collaboration Issues and Solutions
by saurik on Tuesday December 23, 2014 @10:14PM
(#8791389)
I have never heard of an OT implementation with the limitation you state (only being able to keep a single difference), as OT is designed to make that easy to solve: the client can take each new operation it is making and append it to a "difference" buffer, and then transform the difference buffer (which moves contents in its workin copy) by the results from the server when the server acks it's transform. It then can immediately flush this buffer to the server as a new synchronization request. This reuses the exact same logic as any other transform, so it adds almost no code to the client.
As for the limitation that OT only supports inserts and deletes: OT supports anything that can be transformed. If you build an operation "indent area" and then provide a way to partially order that operation against all the other operations (such as "range operation, sort by first position, reverse second, and break ties by operation") you can transform it by moving the position boundaries for inserts and deletes, and when it applies and itself creates a ton of spaces in its interior, that is how it transforms the rest of the operations in the queue. Wave had a number of interesting transforms designed to help it edit structured documents.
Re:Real-Time Collaboration Issues and Solutions
by domagoj412 on Wednesday December 24, 2014 @05:24AM
(#8792362)
Can you explain in more detail how OT limits search & replace for example? I dont see a problem because in our implemetation, text replacement is just anouther insert/delete operation... Or am I missing something?
Disclosure: I'm one of the founders of Floobits[2]. Since native text editors let you do all kinds of crazy stuff with text, we use an algorithm similar to the one described by Neil Fraser.
1. https://neil.fraser.name/writing/sync/
2. https://floobits.com/