News for hackers. Stuff that matters.
Re:NewSQL databases fail to guarantee consistency and I blam... by jules on Saturday September 22, 2018 @11:28AM (#18046350)
It is true: if you allow clients to switch then you can have all three C,A,P.
Re:NewSQL databases fail to guarantee consistency and I blam... by zbentley on Saturday September 22, 2018 @03:13PM (#18047513)
No, you can't. Say you have two nodes, and a client has just sent a COMMIT to node 1. Then Node 1 gets partitioned away from node 2 and the committing client vanishes. Giving clients the ability to switch to node 2 doesn't help you determine whether node 2 does or does not have the data that was committed (consistency), so you have to choose between CP and AP.
Re:NewSQL databases fail to guarantee consistency and I blam... by jules on Saturday September 22, 2018 @07:26PM (#18048532)
You can trivially redirect all clients to node 1 whether or not there is a partition, and voila, you have a CAP system under that definition. If clients can be partitioned from servers then we're back in the original scenario in which switching is not allowed: just partition each client from all but one server (but a different server for each client).

Maybe there is a way to modify the CAP theorem so that it says something non-trivial (e.g. a theorem about the limit of how many node failures a Paxos-like algorithm can handle, but even this is probably trivial, namely half), but the CAP theorem as stated by the originators is trivial, and the proof is a dressed up version of what I stated above. I don't think the authors would disagree with this at all, since they explicitly state:

"The basic idea of the proof is to assume that all messages between G1 and G2 are lost. If a write occurs in G1 and later a read occurs in G2, then the read operation cannot return the results of the earlier write operation."

Isn't it interesting that such a paper has 1600 citations and has reshaped the database industry?