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.

Spanner vs. Calvin: distributed consistency at scale

107 pointsby evanweaverabout 8 years ago

12 comments

ngbronsonabout 8 years ago
The all-to-all dependency step between Calvin&#x27;s sequencer layer and scheduler layer seems like it will be a problem as things scale, because it means that a single stalled sequencer [edit, orig: scheduler] blocks all writes in the system whether they conflict or not. This is the kind of dependence structure that magnifies outlier latencies and unavailability at scale.<p>In Spanner&#x27;s design, on the other hand, a transaction can only be blocked by another one on which it actually conflicts. It will have worse average performance, but better tail latency as things scale.<p>Perhaps it is just a nit, but the blog post is somewhat inaccurate when it says that Spanner uses the commit timestamp to order transactions. It uses locks to order the transactions, then holds the locks for extra time to ensure that TrueTime order agrees with the lock-based order.
评论 #14054792 未加载
atombenderabout 8 years ago
Tangentially, while FaunaDB and Spanner both seem great, and I love consuming the technical details in articles like these, neither I or my companies are ever going to commit to using something which isn&#x27;t open source.<p>I have a real problem understanding why Google (and now FaunaDB) are so clueless and&#x2F;or inconsistent about software licensing. Google seemed to finally get it with Kubernetes, which has grown into a real and vibrant ecosystem; I will (and do) happily use Google&#x27;s hosted Kubernetes product, while I know, at the same time, that I am not locked into a single vendor. With Spanner (and FaunaDB), all I get is lock-in. (The cynic in me suspects that Google&#x27;s open-sourcing of Kubernetes is a cunning strategy to dominate the cloud by commoditizing container orchestration, and thus undermining competitors such as Amazon. After all, it&#x27;s not like Google is open-sourcing Cloud Storage or BigQuery either.)<p>The fact that I can&#x27;t run these products locally on my dev machine is another major downside unrelated to the philosophical aspects of free software.<p>I&#x27;m sure Google and Fauna will make truckloads of money on enterprises that are willing to bet on them, of course. Personally, I am holding out for CockroachDB.
评论 #14054153 未加载
评论 #14054001 未加载
imoldfellaabout 8 years ago
The Spanner design seems more resilient in the face of server failures. The initial Calvin papers call for taking the entire replica offline if a single server in the replica fails. Are there more advanced versions of Calvin that get around this?
评论 #14054647 未加载
评论 #14054576 未加载
rdtscabout 8 years ago
&gt; Before we get started, allow me to suggest the following: Ignore the CAP theorem in the context of this discussion. Just forget about it. It’s not relevant for the type of modern architectural deployments discussed in this post where network partitions are rare.<p>Anyone worried about that statement. Ok so they are rare, but what happens when they do occur? File corruption is rare as well but in our large deployment over thousands of servers I see it happen pretty often.
评论 #14054855 未加载
elvinyungabout 8 years ago
I would like to point out that the original implementation of Calvin is open source: <a href="https:&#x2F;&#x2F;github.com&#x2F;yaledb&#x2F;calvin" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;yaledb&#x2F;calvin</a>
zzzcpanabout 8 years ago
&quot;It’s not relevant for the type of modern architectural deployments discussed in this post where network partitions are rare&quot;<p>I think the post needs to be more precise about this. Modern networks are asynchronous and so they are essentially always partitioned. And this is important, because later, when snapshot and transactional read latencies are discussed, they are not exactly &quot;very low&quot;, not on &quot;AP&quot; systems level. Because &quot;CP&quot; systems need consensus they can&#x27;t just send requests to all of the replicas and wait for the first reply or even read one locally, &quot;very low&quot; there is more about talking to a remote node &quot;low&quot;, with all of the problems associated with it, like poor tail latency, etc.
评论 #14055089 未加载
jchrisaabout 8 years ago
Abadi has an interesting paper here about why so many NoSQL databases are missing transactions. <a href="http:&#x2F;&#x2F;dbmsmusings.blogspot.com&#x2F;2015&#x2F;10&#x2F;why-mongodb-cassandra-hbase-dynamodb_28.html" rel="nofollow">http:&#x2F;&#x2F;dbmsmusings.blogspot.com&#x2F;2015&#x2F;10&#x2F;why-mongodb-cassandr...</a><p>The fairness, isolation, and throughput (FIT) tradeoffs seem more interesting to me than CAP.
评论 #14057032 未加载
hagbarddenstoreabout 8 years ago
No pricing information for the self-hosted version. Gonna pass on this. Why even bother reading shitloads of text for something I can&#x27;t try?
评论 #14053875 未加载
whargarblabout 8 years ago
&quot;The current public version of Spanner does not support client-side interactive transactions either.&quot;<p>Did not know that...why?
评论 #14053478 未加载
venkasubabout 8 years ago
Is there any good paper on Consistency Models across different Network Partitions types?
zenithmabout 8 years ago
Welcome Dan.<p>What other production implementations of Calvin are out there?
评论 #14053564 未加载
z3t4about 8 years ago
I think it&#x27;s often a better strategy to do sharding or micro-services and if possible keep the service so small that it&#x27;s state can fit in a single machine. If you can have data boundaries, like for example one customer do not need to access the data of another customer, then you can separate customers&#x27;s data and place them in different databases.
评论 #14057883 未加载
评论 #14059867 未加载