Hacker News new | ask | show | jobs
by aatd86 954 days ago
I guess my question is of whether the state that is being reached is a legit one in this case.

What is the source of truth eventually?

I think there must probably be a hierarchy that decides it. It's probably a kind of race condition/byzantine general problem.

2 comments

These systems are based on the idea is that rather than directly editing the shared document, each program sends a stream of “update objects.” An example would be “create new line $xyz after line $abc.”

These “update objects” can be combined to get the current document state.

They have the property that if two programs receive the same set of uodate objects, regardless of the order they get them in, then they have the same current document state.

They define any state resulting from applying the operations as “legit.” In order for that to feel “legit” to the users you want to very carefully choose your operations and their semantics.

The answer depends on the specific CRDT algorithm in use. For complex data structures like the ones behind collaborative text editing your intuition that the updates end up looking hierarchical is generally correct.