Ask HN: What's the difference between CRDT vs. Eventual Consistency?

3 points by KiranRao0 ↗ HN
Hi HN, I've seen several articles about CRDTs [1] lately and I don't fully understand how they're different from the concept of eventual consistency [2] in distributed computing.

[1]: https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type

[2]: https://en.wikipedia.org/wiki/Eventual_consistency

2 comments

[ 2.6 ms ] story [ 19.5 ms ] thread
Yep, they're closely related. Here's my attempt to distinguish the ideas, let me know whether this makes sense:

Eventual Consistency is a property that can be used to describe a datastore or an individual datastructure.

So we could say that, for example, "Cassandra is an eventually-consistent database", or that "the Elasticsearch cluster is eventually-consistent".

One of the core features of CRDTs is that they are, by design, always eventually consistent.

That's useful since it allows CRDTs to be used in environments where peers may temporarily go offline, and would like to catch up with other peer changes (and share their own) - eventually - when they are back online.

After a bit more thought and reading, I think that my previous comment here was a bit misleading.

It turns out that only some CRDTs guarantee eventual consistency - I didn't realize that previously.

This description of state-based CRDTs on Wikipedia might be helpful: https://en.wikipedia.org/wiki/Conflict-free_replicated_data_...