HackerPapers

arXiv:1901.01930cs.DC

Keeping CALM: When Distributed Consistency is Easy

Joseph M. Hellerstein, Peter Alvaro

Abstract

A key concern in modern distributed systems is to avoid the cost of coordination while maintaining consistent semantics. Until recently, there was no answer to the question of when coordination is actually required. In this paper we present an informal introduction to the CALM Theorem, which answers this question precisely by moving up from traditional storage consistency to consider properties of programs. CALM is an acronym for "consistency as logical monotonicity". The CALM Theorem shows that the programs that have consistent, coordination-free distributed implementations are exactly the programs that can be expressed in monotonic logic. This theoretical result has practical implications for developers of distributed applications. We show how CALM provides a constructive application-level counterpart to conventional "systems" wisdom, such as the apparently negative results of the CAP Theorem. We also discuss ways that monotonic thinking can influence distributed systems design, and how new programming language designs and tools can help developers write consistent, coordination-free code.

arXiv comments
Journal reference
DOI
Subjects
cs.DCDistributed, Parallel, and Cluster Computing cs.DBDatabases cs.PLProgramming Languages cs.SESoftware Engineering

On Hacker News

Linked by 9 identifiable commenters in 16 comments across 15 threads, from May 2019 to Sep 2025. Found in 4 HN submissions from Jan 2019 to Sep 2024. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments15 threads

    • Interesting that neither the article nor the comments mention the CALM theorem [0], which gives a framework to explain when coordination-free consistency is possible, and is arguably the big idea behind SEC. [0] https://arxiv.org/abs/1901.01930

      charleshnView on HNParent context

    • > Distributed algorithms require more coordination. Sometimes! There's a whole body of research about when distributed algorithms require coordination. One example is the CALM theorem (https://arxiv.org/abs/1901.01930), and another is the ways that scalable database systems…

      mjbView on HNParent context

    • Yes it's a large chunk, but not everything! Marc had a comment on bluesky regarding this: > Many SQL aggregations are monotonic operations (e.g. MAX, SUM, etc) that can be partially completed on each node and then post-merged. Some (e.g. DISTINCT) can be transformed into…

      steepbenView on HNParent context

    • > Perhaps others have made this connection before…it does feel like some sort of universal law of physics. This has been on my mind too, and I can’t help but think the fundamental concept underpinning it all is causality. Reading about “consistency as logical monotonicity” —…

      ojkellyView on HNParent context

    • don't forget about calm. its a shame that that isn't the default we reach for, and only struggle when we really need stronger latency. https://arxiv.org/abs/1901.01930

      convolvatronView on HNParent context

    • *Between two distributed systems that don't share the same transactionality domain or are not logically monotone. It's easy to see that moving data from one row to another is doable in a clustered database, and could be interpreted as a message being delivered. The point is that…

      j-pbView on HNParent context

    • The article should really mention CALM (Consistency as Logical Monotonicity)[1], it's much easier to understand and a more fundamental result than CAP. It is also much more applicable and enables people with little experience to build extremely robust distributed systems.…

      j-pbView on HNParent context

    • There is a theorem called CALM[1] (Consistency as Logical Monotonicity) that shows that systems are eventually consistent iff they are monotonic. I find that reasoning about consistency is much easier from that perspective, for example it immediately gives you an intuition on…

      j-pbView on HNParent context

    • Completely agree. In-region (e.g. at the scale of a US state), CP seems like a clear winner. For more geo-distributed latency becomes challenging, and in environments like IoT and mobile unreliable connectivity becomes challenging. If you're there, you need a principled way of…

      mjbView on HNParent context

    • It's absolutely bonkers that TLA+ struggles with this, given that a system is eventually consistent IFF it is logically monotonic (CALM) [1]. This also doesn't make intuitive sense to me. Model checking should be easier for monotonic models, because because the total model check…

      j-pbView on HNParent context

    • > How do you build a system around a database where values can no longer be valid at any time? This is a difficult problem, and there aren't nice general solutions. If you read the original Amazon Dynamo paper, for example, there's a good discussion of why eventual consistency…

      mjbView on HNParent context

  1. Transactions Aren't Everything 1 comment
    • yeah, that was really brief. I was actually hoping for someone to bring up https://arxiv.org/abs/1901.01930 (keeping CALM) for an interesting alternative

      convolvatronView on HNParent context

  2. CRDT: Fractional Indexing 1 comment
    • You might be thinking of this [1] paper? The core idea being if your problem space lends itself to monotonicity (see the paper for a more precise definition than I can give), then you can build a globally consistent database (around a CRDT) where the end-user doesn't need to…

      newhousebView on HNParent context

    • Are you familiar with Joe Hellerstein and Peter Alvaro's work in this space? CALM provides something of a unifying theory of mergeable operations, of which CRDTs are an "object orientated" special case: https://arxiv.org/pdf/1901.01930.pdf In practice, designers choose…

      mjbView on HNParent context

    • > That function can do whatever it wants, including any number of reads, writes, and arbitrary logic based on the reads. But critically, it can't talk back to the calling client, except for to send the final result. If that function can still do everything the client did and the…

      zzzcpanView on HNParent context

    • There is something based on Bloom IIRC, but the whole concept should be well-described and discoverable from the Keeping CALM paper: https://arxiv.org/abs/1901.01930

      namibjView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.