Move $1 from wallet A to wallet B. A million times a second.
That’s the whole problem, and it is the best-structured chapter in this series — because rather than presenting one architecture, it walks through four, each one solving what the previous one broke:
- In-memory sharding — fast, and loses money when a node crashes
- Distributed transactions — correct, and you can’t explain why a balance is what it is
- Event sourcing — auditable, and too slow going over the network
- Distributed event sourcing — fast, reliable, and shardable
Watching a design fail four times is more instructive than seeing the final answer, so that’s how this is written.
Continue reading »