M
Martin Kleppmann
martin.kleppmann.com · Personal blog · on HN since 2010
Martin Kleppmann, author of Designing Data-Intensive Applications, writes on distributed systems, databases, local-first software, and formal verification.
What HN saysHN commenters recommend his book as a great primer, and cite his accounting article and his analysis of book royalties.
210HN people shared it
131linked it in comments
107stories submitted
6.3Kstory points
2 months agolast shared
2010people per year2026
Most-shared posts
- 1Accounting for Computer Scientists37 people · 560 points · first shared 2011 · 75 comments on HN
- 2How to do distributed locking21 people · 659 points · first shared 2016 · 95 comments on HN
- 3Please stop calling databases CP or AP20 people · 358 points · first shared 2015 · 51 comments on HN
- 4AI will make formal verification go mainstream16 people · 846 points · first shared 2025 · 431 comments on HN
- 5Local-First Software:You Own Your Data, in Spite of the Cloud (2019) [pdf]9 people · 221 points · first shared 2020 · 90 comments on HN
- 6Writing a book: is it worth it?7 people · 646 points · first shared 2020 · 287 comments on HN
- 7Turning the database inside-out with Apache Samza (2015)7 people · 1 points · first shared 2016 · discussion on HN
- 8Hermitage: Testing the “I” in ACID6 people · 113 points · first shared 2014 · 33 comments on HN
- 9It's time to say goodbye to the GPL6 people · 34 points · first shared 2021 · 14 comments on HN
- 10New courses on distributed systems and elliptic curve cryptography6 people · 30 points · first shared 2020 · discussion on HN
- 11CRDTs: The Hard Parts [video]5 people · 419 points · first shared 2020 · 124 comments on HN
- 12Improving the security of your SSH private key files5 people · 330 points · first shared 2013 · 101 comments on HN
- 13A highly-available move opertaion for replicated trees [pdf]5 people · 41 points · first shared 2022 · 13 comments on HN
- 14Schema evolution in Avro, Protocol Buffers and Thrift5 people · 9 points · first shared 2012 · discussion on HN
- 15The Python Paradox is now the Scala Paradox4 people · 192 points · first shared 2011 · 105 comments on HN
What HN people wrote when they linked it
weavie · 2018-03-29
I found Martin Kleppmans book - Designing Data-Intensive Applications (http://martin.kleppmann.com/) to be a great primer.
FuriouslyAdrift · 2026-08-19
Here's an authors account of royalties received from the no. 2 best selling O'Reilly book at the time (around $500k over 6 years)
https://martin.kleppmann.com/2020/09/29/is-book-writing-worth-it.html
mtlynch · 2026-01-02
+1 to OP's book, which is the best beginner guide I've found for understanding Beancount / plaintext accounting.
I was also confused about double-entry accounting for most of my life until I read the article, "Accounting for Computer Scientists"[0] by Martin Kleppman (author of Designing Data-Intensive Applications). It explains double entry accounting in a surprisingly accessible way be putting it in terms of graph theory. I don't even like graph theory that much or consider myself competent in it, but Kleppman's explanation was extremely effective.
[0] https://martin.kleppmann.com/2011/03/07/accounting-for-computer-scient…
logicallee · 2025-12-17
I saw this mentioned in the article "Prediction: AI will make formal verification go mainstream"[1] and thought it is worth its own post.
Does anyone have any experience with SeL4 that they would like to share?
[1] https://martin.kleppmann.com/2025/12/08/ai-formal-verification.html
he1d1 · 2025-04-28
While Git is great at asynchronous collaboration, its a bit clunky to try and work on the same commit with other devs or across devices. This is because Git tracks what changed, not how it changed.
It'd be cool if you were on the same branch as somebody else, or another device, and your working directories could be synced. It'd also be cool for the commit history to be a bit richer, so you could see who, what and when for a change at a keystroke level.
So I'm working on real-time sync for Git! I'd represent the working directory as a tree CRDT [1] and sync that through FUSE and p2p networking.
Not sure whether this is actually a good idea! This is a POC :)
[1] https://martin.kleppmann.com/papers/move-op.pdf
shayansm1 · 2025-02-12
I was introduced to Local First while watching this conference by Martin Kleppmann (the author of Designing Data-Intensive Applications book): https://martin.kleppmann.com/2023/06/29/goto-amsterdam.html. It's worth watching!
jorblumesea · 2024-07-25
CAP was never designed as an end all template you blindly apply to large scale systems. Think of it more as a mental starting pointing, that systems have these trade offs you need to consider. Each system you integrate has complex and nuanced requirements that don't neatly fall into clean buckets.
As always Kleppmann has a great and deep answer for this.
https://martin.kleppmann.com/2015/05/11/please-stop-calling-databases-…
guthriej · 2024-04-10
Martin Kleppmann (author of Designing Data-Intensive Applications) has a great article in the same vein: https://martin.kleppmann.com/2011/03/07/accounting-for-computer-scient…
fragmede · 2024-02-24
https://martin.kleppmann.com/2011/03/07/accounting-for-computer-scient…
Accounting for computer scientists is a good read. it presents double entry accounting in a way that should be more familiar to us, as a graph theory problem.
txredking · 2023-12-22
https://martin.kleppmann.com/papers/local-first.pdf
First one I remember reading a few years ago. Good read.
mateusfreira · 2023-01-31
Great improvements, performance was probably the major concern of automerge prev versions, I have begin reading about CRDTs and this is the correct movement field at the moment.
Local first in my mind means your users can still work even if your server is down for a small amount of time for any reason, which means the users can also jump on an airplane and decide to review/update their price table or check out their sales commissions if they want.
It benefits both sides of the software economy (users and providers)[1].
I recommend the reading the paper from 2019 about local first it is not too academic and gives a good view of the challenges [2].
[1] https://mateusfreira.github.io/@mateusfreira-2022-12-04-my-thoughts-on…
[2] https://martin.kleppmann.com/papers/local-first.pdf
3pm · 2022-08-24
A quote from a related blog post: "Eventually I figured it out: basic accounting is just graph theory. Accounts = Nodes, Transactions = Edges"
https://martin.kleppmann.com/2011/03/07/accounting-for-computer-scient…
Also probably worth checking out Martin Fowler's writing on accounting.
https://martinfowler.com/apsupp/accounting.pdf
https://www.amazon.com/Analysis-Patterns-Reusable-Object-paperback/dp/…
svat · 2022-08-17
There's another very nice description, with useful pictures, by Martin Blais (as part of the documentation of Beancount) at https://beancount.github.io/docs/the_double_entry_counting_method.html (example picture that I would say is the heart of the idea: https://beancount.github.io/docs/the_double_entry_counting_method/medi… )
Another one, with completely different graphs, is by Martin Kleppman at https://martin.kleppmann.com/2011/03/07/accounting-for-computer-scient… — despite the name ("Accounting for Computer Scientists"), on reflection / trying it out, I find it less useful than the Beancount one.
(Both of these are actually linked in the second paragraph of the posted article, but they're independently worth mentioning / good.)
siraben · 2022-07-07
This paper, "Local-First Software: You Own Your Data, in spite of the Cloud"[0] is a great read on how to evaluate software for local-first properties and provides interesting case studies and ideas on how to achieve it, for instance using CRDTs instead of centralized storages.
[0] https://martin.kleppmann.com/papers/local-first.pdf
Gwypaas · 2022-06-18
Heartbeats does not solve it. You need fencing tokens to reject writes if the lock has expired.
See this amazing article by Martin Kleppman, author of Designing Data-Intensive Applications.
"How to do distributed locking"
https://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.…
thethimble · 2022-06-05
DDIA by Martin Kleppmann is fantastic.
Great job of providing low level details contextualized in a high-level narrative. He’s also got these amazing fantasy maps of the fictional landscape of data architecture: https://martin.kleppmann.com/2017/03/15/map-distributed-data-systems.h…
cosmodisk · 2022-01-13
Here's a very detail article from someone who wrote an excellent book:
https://martin.kleppmann.com/2020/09/29/is-book-writing-worth-it.html#…
jstx1 · 2022-01-11
Have a look at this - https://martin.kleppmann.com/2020/09/29/is-book-writing-worth-it.html
Keep in mind that the author's book is one of the most successful technical books out there (I don't have numbers to back this up but it's at the top of every "recommend-a-book-to-me" thread).
outside1234 · 2022-01-01
I am interested in collaborating on a project to make building local first software a simple reality for developers along the “seven ideals” that Martin Kleppmann lays out (see https://martin.kleppmann.com/papers/local-first.pdf).
There has been a number of attempts in this space, but none with a simple developer experience, and I’d like to experiment around fixing that.
If anyone is already is already working in this space I’d love to talk with you.
elmers-glue · 2021-12-16
I suspect that, when it comes down to it, the cake-iest of all apps is a "todo" app :)
My contribution is https://www.chronos-desk.com/
Personally I wanted a task app that was local-first[1] (integrated with my desktop; one-time license/no subscription fee; no saas/web browser), had great keyboard shortcut support, and had first-class support for task estimates.
---
[1] https://martin.kleppmann.com/papers/local-first.pdf
sundarurfriend · 2021-01-12
Your section on single vs double-entry accounting, specifically:
> We can neither create money out of thin air, nor make it disappear. Money has to come from somewhere and go somewhere.
reminded me of the excellent "Accounting for Computer Scientists" by Martin Kleppmann [1], with a very useful and easy to remember mental model of this process.
[1] https://martin.kleppmann.com/2011/03/07/accounting-for-computer-scient…
teleforce · 2020-12-20
Yes, it is one of the most entertaining and insightful articles I have read on computing and programming language for a long time.
All the best for your new Oil shell, and I agree that we need to have similar to POSIX standard for distributed systems but it must put local-first software as the first class citizen [1].
Personally I think the local-first software cannot happen soon enough given that what we have endured for the past 30 years with regard to inefficiency and drudgery of the web based applications.
Just wondering about your thoughts on SDLang [2] as the type alternative to JSON, YAML etc, and lightweight alternative to XML?
[1]https://martin.kleppmann.com/papers/local-first.pdf
[2]https://sdlang.org/
deepakkarki · 2020-11-19
Source and more info : https://martin.kleppmann.com/2020/11/18/distributed-systems-and-ellipt…
This recorded series is from Kleppmann's Concurrent and Distributed Systems course which he teaches at University of Cambridge.
In case the name seems familiar, Kleppmann is the author of perhaps HN's favourite book "Designing Data-Intensive Applications" https://www.amazon.com/dp/1449373321
krackers · 2020-07-28
This is made more clear by the graph theoretic viewpoint in kleppmann's excellent guide: https://martin.kleppmann.com/2011/03/07/accounting-for-computer-scient…
evil-olive · 2019-09-05
The Redlock algorithm suggested for use with Redis has been the subject of some of criticism:
https://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.…
Kleppman is the author of Designing Data-Intensive Applications and generally someone whose opinion I trust in such things.
I love Redis and use it extensively at $dayjob, but I stick to Consul for managing distributed locks. Consul was built from the ground up to handle such things; Redis handles it as a bit more of an afterthought / consequence of other features.
tarsinge · 2019-06-06
Slightly OT but if you want to get a basic understanding of double-entry accounting in a few minutes I found this article really great: https://martin.kleppmann.com/2011/03/07/accounting-for-computer-scient… (discussed here https://news.ycombinator.com/item?id=2298471)
roro159 · 2019-06-05
I think it's worth to add a few previous discussions about distributed locks.
Redlock is a distributed lock using Redis: https://redis.io/topics/distlock
Martin Kleppmann criticized Redlock and mentioned the fencing solution:
http://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.h…
Antirez disagrees with the analysis and the HN post has a good discussion:
https://news.ycombinator.com/item?id=11065933
kthejoker2 · 2019-04-27
As a precursor to this (excellent, in depth) post I also recommend Martin Kleppmann's Designing Data-Intensive Applications, which is (to date) the definitive 101 book on the topic.
He also did these awesome Tolkien-esque maps of the database engine ecosystem: https://martin.kleppmann.com/2017/03/15/map-distributed-data-systems.h…
Anyway, I inject this sort of stuff directly into my veins, so thanks very much for the post!
Sinjo · 2017-10-02
It's been a long time since I looked into this: is there now a way to configure a cluster of Redis instances such that you won't lose messages on node failure? If not, all the nice at-least-once delivery (or "effectively once" when you add message dedupe) you get with something like Kafka/Kinesis/GCP PubSub is gone.
If not, either people's messages don't matter /that/ much (which is fine, just not great for most of my usecases at the moment) or everyone's in for another round of "oh shit, where did the data go?"
Edit: Just in case we end up in CP vs AP datastore wars, please go read https://martin.kleppmann.com/2015/05/11/please-stop-calling-databases-…
At-least-once delivery requires neither CAP consistency (linearisability) nor CAP availability (any non-failed node must return a response in a non-infinite time), but is a very useful property!
daveguy · 2016-06-07
If you're a programmer/CS type, then this is an excellent explanation of accounting principles in terms of graphs:
https://martin.kleppmann.com/2011/03/07/accounting-for-computer-scient…