Commutative (operational transform) diffs for databases
- by barrycarter
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.