Click any tag below to further narrow down your results
Links
This article dives into the hidden failures that crop up when your database leaves the ideal “happy path.” It covers contention, slow queries, race conditions, stale reads, retries and live migrations, and shows how production realities can break simple transactional code.
- A slow query isn't just "slow" — threads sitting idle in transactions hold locks and connections until the pool fills up and unrelated requests start timing out.
- Client-side timeouts and retries can pile new connections onto a backlog while the original transaction still commits, causing duplicate orders or inconsistent stock.
- Concurrent "check stock" calls can each see available inventory and decrement it in parallel, leading to overselling.
- Replica lag and mixed old/new code during schema migrations can silently feed stale reads or trigger deadlocks in production.
This course covers core concepts of concurrency control—threads, locks, transactions, and crash recovery—in the first half, then shifts to distributed systems topics like network models, clocks, replication, consensus, and fault tolerance. It lists lecture topics, objectives, prerequisites, and recommended readings for a Part IB CST Michaelmas module led by Dr. Martin Kleppmann.
- Kleppmann's 16-lecture Part IB course splits evenly: 8 lectures on concurrency control, 8 on distributed systems.
- The concurrency half moves from basic threads/locks through bakery algorithm, semaphores, monitors, and message-passing (actors, CSP) to ACID transactions, 2PL, optimistic concurrency, and crash recovery.
- The distributed half covers network/failure models, physical and logical clocks, replication and consensus (Raft, FLP impossibility, 2PC, CAP), ending with case studies on CRDTs and Google Spanner's TrueTime.
- Core texts backing the course are Tanenbaum's Modern Operating Systems, Goetz's Java Concurrency in Practice, and Kleppmann's own Designing Data-Intensive Applications.
The removal of Python's Global Interpreter Lock (GIL) marks a significant shift in the language's ability to handle multithreading and concurrency. With the introduction of PEP 703, developers can now compile Python with or without the GIL, enabling true parallelism and reshaping how systems are designed, particularly in data science and AI. This change presents both opportunities and challenges, requiring developers to adapt to new concurrency patterns.
- PEP 703 lets Python be compiled with or without the GIL, making the lock optional rather than removing it outright everywhere
- Enables true multi-core parallelism for CPU-bound Python code instead of relying on multiprocessing or async workarounds
- Particularly impactful for data science and AI workloads that need concurrent computation
- Developers will need to adapt to new concurrency patterns and potential thread-safety issues that the GIL previously masked