News for hackers. Stuff that matters.
Re:Automerge: JSON-like data structure for building collabor... by kaoD on Monday February 05, 2018 @11:26AM (#16309806)
It's right there in the README:

> The only case Automerge cannot handle automatically, because there is no well-defined resolution, is when users concurrently update the same property in the same object (or, similarly, the same index in the same list). In this case, Automerge arbitrarily picks one of the concurrently written values as the "winner":

https://github.com/automerge/automerge#conflicting-changes

Re:Automerge: JSON-like data structure for building collabor... by KirinDave on Monday February 05, 2018 @11:53AM (#16310035)
This is very disheartening, because there are a few reasonable strategies:

1. CRDT like linear change rules.

2. Vector clocks.

3. Forking the entire tree and allowing merge queries, creating a DAG of the state that can be interactively and speculatively remerged.

Just picking one winner arbitrary and silently discarding all peers sounds like the kind of thing that gets labeled as a bug when we examine concurrent data stores.

Re:Automerge: JSON-like data structure for building collabor... by pvh on Monday February 05, 2018 @12:05PM (#16310153)
Automerge uses vector clocks internally to track visibility and minimize conflict and retains all alternative values in the _conflicts list for that value.

Automerge must select one result to be the default consistently across all uncoordinated peers. If you don't do this, different nodes may see different documents during a conflict state, which is undesirable.

Re:Automerge: JSON-like data structure for building collabor... by KirinDave on Monday February 05, 2018 @12:10PM (#16310206)
Okay, good answer. I can see why for ease of use you might not just demand that clients work with the raw vector clocks.
Re:Automerge: JSON-like data structure for building collabor... by nolok on Monday February 05, 2018 @11:45AM (#16309957)
Well, so much for "no changes are lost", instead it should be "one of the change is lost, and you can't know which one until it's done ! Suprise !!!"
Re:Automerge: JSON-like data structure for building collabor... by pvh on Monday February 05, 2018 @12:01PM (#16310109)
Conflicts are surprisingly rare, and when they are detected they show up in the _conflicts list for resolution per your needs. What automerge guarantees is that unless you care about the conflict you don't need to take any action.
Re:Automerge: JSON-like data structure for building collabor... by kba on Monday February 05, 2018 @11:53AM (#16310033)
There is a change history. No changes are lost.
Re:Automerge: JSON-like data structure for building collabor... by KirinDave on Monday February 05, 2018 @11:55AM (#16310049)
Can clients quickly access the change history to figure out what happens? Can the relevant change history for an object or a proposed change be retrieved in linear time?
Re:Automerge: JSON-like data structure for building collabor... by sli on Monday February 05, 2018 @11:29AM (#16309831)
Merge conflicts are handled transparently and seemingly indeterminately? Yikes.
Re:Automerge: JSON-like data structure for building collabor... by kba on Monday February 05, 2018 @11:46AM (#16309968)
This isn't for a banking system, this is for building collaborative apps. If you press "A" and your friend press "B" into a Google Docs document at the same time, you also don't know if the document is going to read "AB" or "BA". In practice, this is not an issue.