Concurrency
3 engineering logs on Concurrency. Newest first.
- Async does not mean parallel, and confusing them costs you a thread pool
Why an event loop with one thread can serve ten thousand connections and still be destroyed by one CPU bound handler, and why marking a method async does nothing for work that never waits.
- Deadlocks are a lock ordering bug, and lock ordering is a design decision
Why two transactions doing the same thing in a different order will eventually stop forever, why the database picking a victim is the good outcome, and why sorting your identifiers before you touch them removes an entire class of incident.
- Decoding isolation levels: I built a toy DB to force dirty reads and phantom reads
Why the ANSI isolation table does not describe your database, what a phantom read actually is at the index level, and why snapshot isolation still lets two correct transactions corrupt each other.