
Differential Synchronization (2009) - panic
https://neil.fraser.name/writing/sync/
======
amelius
There is a fundamental problem with difference-based synchronization: the
meaning (intention) of operations is not preserved.

So while this method may work well in many cases in practice, there are
classes of problems where the approach does not work. These problems may
involve, for example, more complicated invariants that must hold between
different parts of the data.

~~~
kazinator
> _complicated invariants that must hold between different parts of the data._

Like, oh, when that data is, say, _program code_. Or text that has to be very
consistent in the promises that it is making, or the requirements that it is
specifying, and so of forth.

I.e. this is good enough for sloppily written collaborative fiction. Writer W0
kills a character C0 in chapter 3, while writer W1 not knowing about this
removal of C0 causes the character to appear in chapter 4. Oh well, the sky
isn't going to fall!

Even if these changes are in the same file, and even if the diff and patch
identify textual conflicts, the chapters are too far apart for these changes
to be so identified.

The aim in this algorithm seems to be to make it so easy and transparent that
_all_ textual conflicts disappear, presumably because the target audience is
users whose heads would explode at the idea of resolving a conflict. (Rather
than just swell up and get sore, as in the case of software developers
accustomed to version control.)

~~~
skybrian
Yes, this technique isn't intended for general-purpose synchronization. In
particular it's not for offline synchronization. It's about something like
Google Docs where everyone is online and lots of small diffs happen quickly.
If there's a conflict, you can see it happening in real time and can easily
correct it.

~~~
kazinator
Sure, if the whole document fits on a napkin, maybe.

Could you always spot a conflict in real time if 15 people are plugging away
at a 500 page document?

It is quite hard for just _one_ person to produce a big document, and hunt
down all the inconsistencies.

~~~
skybrian
Yes, writing a book requires serious organizational skills. But no diff or
sync algorithm is going to handle this so I don't know why you're bringing it
up. When it matters (and for many docs it doesn't), it's up to the users to
coordinate on their work.

Even with programming, we don't use source control systems to find conflicts
between distant parts of a program. We see if it compiles and all tests pass.

~~~
kazinator
_But no diff or sync algorithm is going to handle this so I don 't know why
you're bringing it up._

Because that's what programmers do when they see claims like "robust and self-
healing".

