Re:Automerge: A JSON-like data structure (a CRDT) that can b...
by dgb23 on Monday February 21, 2022 @07:04AM
(#30414871)
I think CouchDB/PouchDB do this similarly, the winner is deterministic though?
[ Parent
| on HN ]
Re:Automerge: A JSON-like data structure (a CRDT) that can b...
by samwillis on Monday February 21, 2022 @07:45AM
(#30415275)
CouchDB and PouchDB have no idea how to merge a conflict, if two copies are edited prior to syncing, one version it marked as the 'winner' and the other as a conflict version. As the developer you can then either chose to dispose of conflicts or have your own way of merging them.
This is actually a perfect use case for CRDTs such as Automerge and Yjs, I actually built a proof of concept combining Yjs with PouchDB to handle the conflicting edits:
https://discuss.yjs.dev/t/distributed-offline-editing-with-c...