Re:ShareJS – Live concurrent editing in your app
by tarr11 on Wednesday May 02, 2012 @12:05PM
(#3919769)
Operational transform is not the same as diff-match-patch.
DiffMatchPatch gets confused pretty easily around similar content. It uses lexical similarity to determine the patch. It often fails, and the API actually tells you that it was unable to apply a patch. For example, if you make a huge change to a file, diffMatchPatch will be unable to generate a patch file.
Operational Transform, on the other hand, uses some an ordered sync to ensure that changes are applied in a consistent way across all clients. It woudln't fail in the same way and is resilient to more kinds of changes.
DiffMatchPatch gets confused pretty easily around similar content. It uses lexical similarity to determine the patch. It often fails, and the API actually tells you that it was unable to apply a patch. For example, if you make a huge change to a file, diffMatchPatch will be unable to generate a patch file.
Operational Transform, on the other hand, uses some an ordered sync to ensure that changes are applied in a consistent way across all clients. It woudln't fail in the same way and is resilient to more kinds of changes.