Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's more shifting the view point. CRDTs are not just something you 'use'. They are laws a system must be obey to achieve strong eventual consistency.

Eventual Consistency: If Node A and Node B have received the same set of events (ie in any order), they will eventually have the same state.

Strong eventual consistency: Exactly the same, but replace "eventually" with "immediately".

Meaning as long as all nodes get the same events, they'll have the same state, straight away. That's sync that works.

As long as your merge algorithm is commutative, associative, and atomic, your sync will work. That's what the CRDT people uncovered.

A data structure can obey these laws (the aforementioned CRDT libraries)

A database can obey these laws (the original Amazon Dynamo did this, it was a CRDT).

Any arbitrary system can obey these laws (there's 1982 paper described this for a distributed file system)



Okay I’m with you, but if I’m not mistaken I believe you have slightly mis-characterized what strong eventual consistency is.

> Strong eventual consistency: Exactly the same, but replace "eventually" with "immediately".

I believe this isn’t quite correct. I was under the impression that the delivery doesn’t have to be immediate, but rather that any two nodes with the same set of events, regardless of received order, must be in the same state.


https://inria.hal.science/hal-00932836/file/CRDTs_SSS-2011.p...

I'm taking my definitions from section 2.2 here. I feel like I've summarised it fairly accurately, but if I've made a mistake would be happy to be corrected.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: