Re:A Conflict-Free Replicated JSON Datatype
by rdtsc on Wednesday August 17, 2016 @04:28PM
(#12308187)
It seems in this case it might be
{"A" : [2, 3]}
This kind of stuff is useful if users explicitly understand and design their application to expect this kind of stuff. It might not be possible always.But note, that there is still a good value in all the servers which got the same conflicts ending with the same result. As opposed to say server1: picking {"A" : 2} and server2 {"A" : 3}. Now something can be built on top of it given it understand and accounts for how merges happen.
Consider storing a single value in a document:
Q updates it to 2, P simultaneously updates it to 3. What is the correct outcome? Interactive consensus would be required even if humans were doing this by hand; unless quantum, there exists no accurate merge. That's not to say that CRDTs are useless, just not as grandiose as "automatic and accurate."