The problem that Operational Transformation (OT) solves is the following: You want to work on a document, source code or drawing together with other users over the internet and want to see the edits of other users live. Your edits should appear instantaneous without a lag caused by network latency and multiple edits happening at the same time should not lead to divergent document states. This technology is used by many popular applications including:
Here’s the short overview:
insert(0, 'B'). If we would simply send B’s operation to client A and applied it there, there is no problem. But if we send A’s operation to B and apply it after B’s operation has been applied, the character ‘A’ would be inserted one character one position left from the correct position. Moreover, after these operations, A’s document state and B’s document state wouldn’t be the same. Therefore, A’s operation
insert(12, 'A')has to be transformed against B’s operation to take into account that B inserted a character before position 12 producing the operation
insert(13, 'A'). This new operation can be applied on client B after B’s operation.
However, you don’t have to understand the details of Operational Transformation to use it with this library in your own project.