Adventures with Concurrent Programming in Java: A Quest for Predictable Latency
summary
Claims concrete latency and scalability tradeoffs, measured not promised: 167 ns baseline for a lockfree one-to-one ring buffer, blocking condition-variable handoffs that spike to 5 ms outlier and tens of microseconds, and 100-message bursts that push blocking queues to ~180 µs. Implements lockfree rings, a process-shared ring file for IPC, and Aeron-style rotating buffers using xadd-style atomics and background zeroing; results show ring buffers and Aeron reduce tail contention to ~34 µs under load. Code and benchmarks (Disruptor Aeron SBE) are on GitHub and actually run.
AI-written summary · about
chapters (44)
- 0:00Introduction
- 0:46A Quest for Predictable Latency
- 1:20Being Responsive
- 1:42Agenda
- 2:44Blocking
- 3:10Exclusion
- 3:29Systemic Pauses
- 4:33Concurrent Algorithms
- 5:54Service Time
- 7:12Queue Theory
- 8:48Message Passes
- 9:51Condition variables
- 10:22Measuring condition variables
- 11:07Microseconds
- 12:54Measuring Microseconds
- 13:38Scientific Method
- 17:34Concurrent Link
- 18:44InterThread FIFO
- 19:04Disruptor
- 20:48Cursor
- 22:45Demo
- 24:06The Head Independent
- 25:15The Numbers
- 26:38The Disruptors
- 26:52How do I work across processes
- 27:22How do I consume
- 28:05The header
- 28:48Cleanup operation
- 29:12Concurrent messaging
- 30:28One big file that goes on forever
- 31:15Rotating the buffers
- 31:25Moving forward
- 34:03Readers
- 34:25Zeroing
- 34:47Predictable Latency
- 36:33False Sharing
- 37:43LockAx Art
- 38:25Logging
- 39:30Learnings
- 41:12Memory copying
- 43:17AXE
- 43:57GitHub
- 44:10Questions
- 44:37Atomic Operations
related talks
39mBuild blazingly fast, ultra lightweight cloud native Java enterprise applications
41mBuilding Low Latency Microservices & Monoliths in Java
34mThe Holy Grail of Systems Analysis: from What to Where to Why
44mDeep Dive talk | Resilience in Microservices with Congestion Control
47mEverything Loosely Coupled - Advanced Integration Patterns and Their Trade-Offs
53mYou Keep Using That Word: Asynchronous And Interprocess Comms
45mReactive design patterns for microservices on multicore
30mWhat's the Cost of a Millisecond?
