Hacker News new | ask | show | jobs
by sophacles 2641 days ago
I don't really understand CRDTs, but I'd like to. The problem I keep encountering is that resources either assume I'm better at math than I am, or they come across as trying to over simplify/poorly analogize a hard thing (reminiscent of monad tutuorials ~2011). Can anyone point me to some resources that slowly,but thoroughly explain the concepts to me?
2 comments

This is one of the best videos I've seen on CRDTs: https://www.youtube.com/watch?v=pMMDVphop40

CRDTs are just a way to send to send data between parties so that all parties end up with the same thing after receiving all messages, even if they receive them out of order. The way the messages are encoded is the math part, ensuring that you can keep applying these functions to your existing state to always get to the final state. That's where the associative/commutative requirements come from.

Note that there are operation-based (sending how something should be updated) and stated-based (sending what it should be updated to) CRDTs and they have different semantics and use-cases.

Wow, that is a fantastic video, thanks!
Here's my attempt at explaining what CRDTs are in 30 seconds:

CRDT are a type (e.g. a String, a Vector, an Integer) that has limitations with how it can be mutated.

For example, you can create an Integer CRDT that can only be `increased` and `decreased`, or a String CRDT that can only have characters `inserted` and `deleted` at given positions.

These limited mutating capabilities are chosen so that there never can be any conflict.