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.

Keeping CALM: When distributed consistency is easy (2019)

139 pointsby harperlee9 months ago

6 comments

mjb9 months ago
I love this work. I might claim it (and some of its antecedents) is the most important distributed systems work of the last decade.<p>Why? It addresses the central question in distributed (and multi-threaded!) system design: when do we need to coordinate between systems? This is important for exactly the reason that the James Hamilton quote says. Successful scalability requires avoiding coordination. Scalable systems (and efficient systems, and fast systems) are the ones that minimize scalability to the level absolutely required by the guarantees they want to offer.<p>As the authors say:<p>&gt; As system builders, of course, we are interested in the complement of this space: what can be achieved, and, importantly, how can we achieve it while minimizing complexity and cost? The CALM Theorem presents a positive result that delineates the frontier of the possible.<p>This tool for thinking about what possible systems we can build is one that&#x27;s very understandable to most programmers:<p>&gt; A program P is monotonic if for any input sets S,T where S ⊆ T, P(S) ⊆ P(T).<p>A program is monotonic if, when you run it on a subset of its inputs, you get a subset of its outputs. As you run it on more data, the set of true things may grow, but it never shrinks.<p>&gt; A program has a consistent, coordination-free distributed implementation if and only if it is monotonic.<p>Now we have a useful roadmap to designing scalable distributed system, fault tolerant distributed systems, scalable parallel compute code, and fast multi-threaded code. Using the definition we can identify whether a program is monotonic, and if it is we know we can implement it without coordination. If it is not, we can decompose a program into monotonic and non-monotonic parts, and (if all goes well) take advantage of the non-monotonicity. In many cases, we can do tons of parallel work and only coordinate a couple times.<p>&gt; Conflict-free replicated data types (CRDTs) provide an object- oriented framework for monotonic programming<p>More conceptual clarity! CRDTs are widely used, and widely talked about. Why do they work? Because they provide ADTs for writing monotonic programs.
评论 #41443584 未加载
评论 #41441356 未加载
评论 #41444698 未加载
mehulashah9 months ago
This is a cool result from a couple of famous database experts. Though, it seems that the only set of practical programs that satisfy the CALM property are set-based operations found in database systems. These are expressive, but not expressive enough to cover all possible computations. So, is it the case that all computations can be decomposed into a partial order of CALM programs each of which don’t need coordination except at the points of order. If so, is this approach analogous to Lamport’s CStructs in Generalized Consensus?
评论 #41445715 未加载
Groxx9 months ago
early 2019 fwiw.<p>CACM has a (large) 2020 blog post about it too: <a href="https:&#x2F;&#x2F;cacm.acm.org&#x2F;research&#x2F;keeping-calm&#x2F;" rel="nofollow">https:&#x2F;&#x2F;cacm.acm.org&#x2F;research&#x2F;keeping-calm&#x2F;</a><p>I remember seeing a blip of this when it came out, but I haven&#x27;t heard anything since. Anyone know if it&#x27;s known &#x2F; used &#x2F; ??, or has it been subsumed by some other thing?
评论 #41441089 未加载
评论 #41442604 未加载
parentheses9 months ago
I&#x27;m trying to think about service oriented architectures (or microservices - choose your term). Based on this..<p>- looking at the larger system, you are preventing scale by creating interconnects between these services<p>- looking at the services themselves, it makes the logical boundary smaller, thus giving opportunity to find monotonicity more easily<p>How do others think of this?
MeteorMarc9 months ago
Just to make this discussion less abstract: is a groupby operation monotonic?
评论 #41442285 未加载
评论 #41447186 未加载
评论 #41442315 未加载
emoII9 months ago
How far away is this from saying ”just program distributed systems functionally”?
评论 #41444587 未加载