TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Please stop calling databases CP or AP (2015)

151 pointsby reese_johnover 4 years ago

8 comments

sradmanover 4 years ago
Martin Kleppmann applies critical thinking to the claims of NoSQL marketing; I wish I was aware of his work at the time.<p>I always found it frustrating that the semantics of the word &quot;Consistent&quot; in ACID has nothing to do with the semantics of CAP &quot;Consistency&quot;. ACID Consistency refers to integrity constraints while CAP Consistency seems to refer to Cache Coherence across nodes in a cluster. I was a little surprised that Kleppmann uses the idea of &quot;Linearizability&quot; to explain the discrepancy but it does clearly identify the same mistaken assumptions.<p>I was also frustrated with the NoSQL movement&#x27;s focus on Partitioned clusters when my intuition was that it was a very rare failure mode. Perhaps we can now return to the metrics of data loss (RPO - Recovery Point Objective) and Recovery Time Objective (RTO) since we seem no closer to fully transparent failure recovery.<p>Regardless, the goal was always to have available and scalable databases that operate on clusters of commodity cloud servers and all of the SQL, NoSQL, and NewSQL solutions have converged around that goal. The transition to cloud computing seems to have been more about NoRAID than NoSQL. Some technologies like LSM-Trees address important use-cases in commodity clusters so maybe we&#x2F;I shouldn&#x27;t focus on the truthiness of the original rhetoric.
评论 #24398647 未加载
georgewfraserover 4 years ago
The CAP theorem is so dumb and yet so influential. If you want to gain a more useful understanding of the trade offs of distributed systems, I highly highly recommend the “PACELC theorem” by Daniel Abadi:<p><a href="https:&#x2F;&#x2F;www.cs.umd.edu&#x2F;~abadi&#x2F;papers&#x2F;abadi-pacelc.pdf" rel="nofollow">https:&#x2F;&#x2F;www.cs.umd.edu&#x2F;~abadi&#x2F;papers&#x2F;abadi-pacelc.pdf</a>
评论 #24396058 未加载
评论 #24396234 未加载
评论 #24396960 未加载
gennethover 4 years ago
In reality the application running on top of the database wants C-kinda-A. <a href="https:&#x2F;&#x2F;research.google&#x2F;pubs&#x2F;pub45855&#x2F;" rel="nofollow">https:&#x2F;&#x2F;research.google&#x2F;pubs&#x2F;pub45855&#x2F;</a><p>&gt; Despite being a global distributed system, Spanner claims to be consistent and highly available, which implies there are no partitions and thus many are skeptical. Does this mean that Spanner is a CA system as defined by CAP? The short answer is “no” technically, but “yes” in effect and its users can and do assume CA.<p>The point is that if my application will actually go down anyway if the WAN craps out, then really, I don&#x27;t actually need P. The application would also be significantly simpler if it assumes that if the application can work, then the DB is also up. And one seems that realistic systems built on Spanner simply assume CA and then get on with life...
评论 #24415659 未加载
EGregover 4 years ago
CAP is trivial and doesn’t tell you anything except that you can’t have all three things perfectly. It says nothing about the various trade-offs.<p>Often you can just let the people choose whether to accept the latest state of a particular partition of the database, or wait until it becomes consistent again.
评论 #24396160 未加载
评论 #24396972 未加载
Autowiredover 4 years ago
Always wondered, if the CAP theorem does not account for latency, one assumes infinite latency does not impact availability. Shouldn&#x27;t then be possible to define a theoretical system with an infinite buffer that, in the event of a network partition, will simply keep all incoming requests on hold (infinitely or until the partition is undone), satisfying CAP?<p>I know this is a useless construct in practice, and there is probably a flaw in my reasoning, but it seems to me that you have to establish a non-infinite timeout for the proof to be consistent.
评论 #24399672 未加载
dangover 4 years ago
Discussed at the time: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9525266" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9525266</a>
exabrialover 4 years ago
The best thing ever to happen to interviews was CAP questions to go out of the way of the dodo in terms of Silicon Valley fashion.
评论 #24396965 未加载
GuB-42over 4 years ago
So the CAP theorem is a bit like Godel incompleteness theorem.<p>CAP tells us that databases are fundamentally broken, Godel theorem tells us that math is broken. But besides being important theoretical points, they don&#x27;t matter that much in practice. In the same way, the two generals problem doesn&#x27;t prevent TCP from working fine.
评论 #24397620 未加载