Commutative (operational transform) diffs for databases

Posted by barrycarter on Stack Overflow See other posts from Stack Overflow or by barrycarter
Published on 2010-05-31T02:22:16Z Indexed on 2010/05/31 2:32 UTC
Read the original article Hit count: 290

Filed under:
|
|

What Unix program generates "diff"s between text files (or INSERT/UPDATE/DELETEs for databases) in such a way that the order that the "diff"s are applied in is irrelevant, and the result is the same regardless of order.

Etherpad used to do something like this.

Example (for a given document or database):

% Adam makes a change X, then Bob makes a change Y, then Adam makes another change Z.

% However, because of network latency, Adam sees the changes in this order: XZY, while Bob sees them in this order: YXZ.

% However, the code/changes are written so that XYZ and YXZ yield the same result.

Note: ideally, this can be done without having to do X/Y/Z inverse at any point.

I have read http://stackoverflow.com/questions/2043165/operational-transformation-library but I'm not sure this really does what I want.

© Stack Overflow or respective owner

Related posts about transform

Related posts about etherpad