News for hackers. Stuff that matters.
Re:Introduction to Curp Protocol by toomim on Monday October 30, 2023 @06:48PM (#38077006)
Or you could just use a CRDT.

You don't need PAXOS, RAFT, or CURP to implement a key-value store. Those are distributed state machines, all you need is distributed state.

That means you don't need a leader election. You don't need a leader. You don't need any round trips. You don't need coordination.

PAXOS was the only game in town for many decades, but there are better ways to do this now.

Re:Introduction to Curp Protocol by api on Monday October 30, 2023 @06:52PM (#38077062)
CRDTs don’t magically solve the ordering problem, though they do solve a bunch of other problems around merge conflicts.
Re:Introduction to Curp Protocol by toomim on Monday October 30, 2023 @11:54PM (#38080084)
They completely solve the ordering problem of a key-value store as described in this article.

What they don't do is give you a global linear ordering. But you don't need that in a key-value store, and you don't need that in most distributed computing.

People keep reaching for PAXOS and RAFT when they don't need it. It's pretty rare that you need a distributed linearization.

Re:Introduction to Curp Protocol by enos_feedler on Tuesday October 31, 2023 @01:52AM (#38080788)
What are the rare cases where its generally the right choice? Just curious
Re:Introduction to Curp Protocol by camkego on Tuesday October 31, 2023 @06:41AM (#38082744)
This is really worthy of a good blog post or article, if it hasn't been written yet.
Re:Introduction to Curp Protocol by toomim on Tuesday October 31, 2023 @05:09PM (#38091400)
Yes, it is. I'm trying to spread the word... but maybe this is the kind of thing that needs a good full-size articulation for it to really click.
Re:Introduction to Curp Protocol by eatonphil on Monday October 30, 2023 @07:54PM (#38077701)
CRDTs are eventually consistent whereas Raft/Paxos consensus enables strict consistency with high availability. If you don't need strict consistency or you don't need high availability, then yeah, you don't need consensus.
Re:Introduction to Curp Protocol by camkego on Tuesday October 31, 2023 @06:49AM (#38082801)
This isn't my area, so I don't really know.

But, if CRTDs allow independent operation, don't they check the high availability box?

Re:Introduction to Curp Protocol by geocar on Tuesday October 31, 2023 @07:22AM (#38083079)
You can't really have "independent operations" on a bank account.

If node A sees deposit,withdraw and node B sees withdraw,deposit one of those is business-as-usual, the other is overdraft. You can't have a "high availability" system where some parts of the system are acting like it's okay, and other parts aren't.

Not everything is a bank, but a lot of things are often more-like-a-bank than they first appear...

Re:Introduction to Curp Protocol by eatonphil on Tuesday October 31, 2023 @07:22AM (#38083087)
Many things provide high availability, including hot backups that you manually promote to leader (i.e. the traditional database setup).

However, it's distributed consensus that solves for strict serializability (I should say, not strict consistency) and high availability as a combination.

See also the Jepsen page on consistency levels.

https://jepsen.io/consistency/models/strict-serializable