Why do we need operational transformation for real-time collaboration?

Having seen applications such as Google Docs and libraries such as ShareJS and EtherPad Lite , I am very pleased to work in real time, and this seems to be implemented using a very complex method known as Operational Transformation.

My question is perhaps a little strange: why do I need OT?

I mean, we have a very low latency on the Internet in most settings - with tools like Google Docs, ShareJS and EtherPad, the changes are reflected almost instantly on the connected clients.

Why is the incredibly complex conflict resolution and storage solution synchronized on the server side?

Getting to know the template and undo / redo, it seems to me, a much simpler solution would be to simply implement each change in the document as a command with an equivalent undo command.

Let customers present serialized commands when making changes. Assign a server-side serial number to each received command. Distribute all the commands that apply to the document back to clients who also maintain command history.

Each connected client receives back from the server all the commands applied to the document, now with serial numbers indicating the "correct" order, for example. the order in which the commands were received by the server and in which they were applied to the main document stored on the server.

If the client was at number 100 and sends a new command to the server, which returns as number 102, the client knows that he missed the command - then he simply applies the "cancel" command to the last command presented, applies the command number 101, and then applies it again own command number 102, thereby returning things in order.

If it is behind several teams, it simply rolls back as necessary, then applies all the missing commands, etc.

That sounds a lot easier for me.

How is operational conversion better than this?

+4
source share

All Articles