Earlier quoted context omitted.
I would suggest just dropping Kolmogorov in general, and just referencing the human idea that shorter is generally going to be simpler. I wouldn't have a problem sticking with you through that. Sure, I can feed that to my pedant mill as with anything else, but since it's not really the core idea I'll roll with you on it.
Agreed. The section basically boils down to "despite maybe looking simpler, Single-Decree Paxos is still tricky." I don't think something particular and formal like Kolmogorov complexity even fits the tone there.
In search of a simple consensus algorithm
71–80 of 87 posts
Re: In search of a simple consensus algorithm
#72Earlier quoted context omitted.
> cannot start a paxos instance for a new log entry until all prior instances have been resolved It's wrong. In Grydka (Single-decree Paxos) all the keys are independent so it's possible to update them at the same time without blocking. Grydka's throughput is comparable to Etcd on the same type of machines (4720 vs 5227 rps) and I never optimized for it (my goal was to fit 500 lines) so it's also wrong that it's "non…
This is true, but comes at the cost of not being able to preserve linearity across arbitrary keys, and you are still limited by the throughput on updates to a single key.
1. There are tasks which don't require atomic multi-key updates
2. Atomic multi-key updates can be implemented on the client side (see RAMP, Percolator transactions or the Saga pattern)
3. Once the data overgrow the size of one machine you need to shard the log and at this time you're in the same situation
Re: In search of a simple consensus algorithm
#73Earlier quoted context omitted.
This is true, but comes at the cost of not being able to preserve linearity across arbitrary keys, and you are still limited by the throughput on updates to a single key.
Assuming linearity is atomic multi-key updates: 1. There are tasks which don't require atomic multi-key updates 2. Atomic multi-key updates can be implemented on the client side (see RAMP, Percolator transactions or the Saga pattern) 3. Once the data overgrow the size of one machine you need to shard the log and at this time you're in the same situation
My main point was that the deficiencies of strong-leader-based consensus protocols are overstated, and despite a (minor IMO) level of additional starting complexity, a raft-like protocol is going to be quite a bit simpler than a paxos-based protocol of equivalent capability.
Re: In search of a simple consensus algorithm
#74The article abuses Kolmogorov complexity... > When it is applied to the algorithms, it means that an algorithm with the shortest implementation is simpler. That is misleading. Kolmogorov complexity is the length of the shortest program (in a pre-defined language) that produces a given object. So, if the shortest program that produces Algorithm A is smaller than the shortest program that produces Algorithm B, then the…
Kolmogorov complexity is not computable in general , but it is decidable for a substantial subset of programs.
Re: In search of a simple consensus algorithm
#75Hibari does have a master orchestrator, similar to GFS master server. But it's only needed in reconfiguration events.
Re: In search of a simple consensus algorithm
#76The article abuses Kolmogorov complexity... > When it is applied to the algorithms, it means that an algorithm with the shortest implementation is simpler. That is misleading. Kolmogorov complexity is the length of the shortest program (in a pre-defined language) that produces a given object. So, if the shortest program that produces Algorithm A is smaller than the shortest program that produces Algorithm B, then the…
Re: In search of a simple consensus algorithm
#77That is a key insight. I often wonder if people who implemented Raft and discarded Paxos right off the bat knew this? Also I think "Paxos Made Live" scared everyone away from Paxos for a long time.
But what is often missing is that Google implemented a distributed log system. Paxos doesn't do a distributed log by default and just deals with reaching consensus on a value. In practice there is often a need for a log, but not always. If a distributed log is not need Paxos becomes less scary.
Re: In search of a simple consensus algorithm
#78Earlier quoted context omitted.
Kolmogorov complexity is not computable in general , but it is decidable for a substantial subset of programs.
Really? Do you have an example of a substantial set of programs where that holds? I don't see a priori how it could work unless you can do exhaustive search over the space of all programs and determine if they halt and return the right answer.
Edit: but if someone gives you the primitive recursive Kolmogorov complexity of a program, you can check it by running all shorter programs on all inputs until you found a counterexample for each of them. So it is semi-decidable.
Edit to edit: This would even work for the general Turing-machine definition of Kolmogorov complexity.
Re: In search of a simple consensus algorithm
#79Re: In search of a simple consensus algorithm
#80It's strange that I can't find anything on implementing a CAS register this way. It seems like a relatively straightforward combination of single-decree paxos and the ABD algorithm. Of course, reasoning about distributed algorithms is never simple, and this still isn't...
With single-decree Paxos you can write a storage which provides the following API:
function changeQuery(key, change, query) {
var value=this.db.get(key); value = change(value);
this.db.commit(key, value);
return query(value);
}
By providing different implementations of change & query you can achieve different beviour including CAS.