The document discusses the Disruptor, a data structure and work flow that allows for high-performance concurrent programming with no contention. The Disruptor uses a ring buffer to pass messages between threads very quickly in a parallel manner. Publishers can insert events into the ring buffer, while batch event processors can read the events in batches to process them in parallel threads. The Disruptor framework encourages modeling the problem domain and provides reliable ordering, parallelism, and high performance.
In this document
Powered by AI
Overview of concurrent programming and The Disruptor framework, introduction to fast message passing and the concept of contention-free data structures.
Detailed discussion on the Magic RingBuffer, its structure, and how it enables efficient data handling.
Description of events as buckets and the initial challenge of integrating data into the RingBuffer.
The role of the Publisher in the Disruptor and the benefits of batching behavior.
The importance and processing of BatchEventProcessor for efficient data management.
Insights on the impact of complex workflows, parallel processing, and key caveats such as buffer size and event handler management.
Advantages of using the Disruptor framework: domain modeling, reliable processing, and performance considerations.
Description of various WaitStrategies and ClaimStrategies to optimize asynchronous processing in the Disruptor.
Caveats
• Your ring buffer needs to be bigger than 12
• Event handlers are on separate threads
• Mileage May Vary - always performance test
Tuesday, 9 October 12
41.
You get...
• A framework the encourages you to model
your domain
• The ability to run in parallel but single-
threaded
• Nice, simple Java
• Reliable ordering
• ...and it can be very fast
Tuesday, 9 October 12
42.
Is that it?
• Wait strategies
• Batch publishing
• Multiple publishers
• The Wizard
• You don’t even need a RingBuffer...
Tuesday, 9 October 12
43.
More Information
• Github:
github.com/LMAX-Exchange/disruptor
• Google Group
• Blogs
Tuesday, 9 October 12