LMAX Disruptor
https://lmax-exchange.github.io/disruptor/
- The Disruptor is a concurrency framework created by LMAX to achieve very low latency and high throughput on their Java trading platform.
- LMAX found that using queues between stages of their system introduced latency, so they focused on optimizing this area.
- The Disruptor uses a lock-free “ring buffer” approach to avoid cache misses and locks at the CPU level, which are very costly.
- The Disruptor is intended as a general-purpose solution for concurrent programming, not just for financial applications.
- Applying the Disruptor pattern is not as simple as replacing all queues with the ring buffer - the user guide provides guidance.
- There are blogs, articles, technical papers, and performance tests that explain how the Disruptor works.
- A presentation and discussion group are also available for learning about the Disruptor from its creators.
- Martin Fowler has reviewed the Disruptor’s use at LMAX.
- The Disruptor is significantly faster than the ArrayBlockingQueue, as shown in the latency histogram.
- More performance results are available comparing the Disruptor to other approaches.