Disruptor: High performance alternative to bounded queues (2011) [pdf]
lmax-exchange.github.io
lmax-exchange.github.io
There's also a really informative presentation[2] by Martin Thompson on some of the ideas that they're using to get really low latency and high throughput.
(Not really sure about how the whole submit-a-thing works around here, so I just thought I'd mention it.)
Also want to append https://projectreactor.io/ which uses most if not all of the aforementioned technologies too.
"You get better performance if you implement your event queue via a pre-allocated ring buffer instead of (dynamically allocated) linked-lists or arrays."
Is it really just that? If so, this is nothing new, but quite common in game programming and related fields. For example, see: https://fgiesen.wordpress.com/2010/12/14/ring-buffers-and-qu...
What am I missing?
I have implemented a multiple producer, single consumer variant in C for logging and it works quite well. Loggers can write their message concurrently to the ring buffer, but the order will be correct in the log file.
The idea behind he Disruptor is to move data between threads in a contention free manor.
The disruptor is an actual library based on ring buffers (other have already pointed out some other features).
In practical terms, this library has been immensely popular. Within a couple years of disruptor's release, practically every (java based) trading firm was using them. I've even seen c++ implementations, only vaguely resembling this library, being referred to as 'disruptors.'
Beyond the library, the original (and subsequent) presentations by the authors popularized the concepts of "mechanical sympathy" (understand the abstraction layer beneath what you are currently working in) and introduced a whole new set of developers to modern CPUs, thinking about cache lines, etc.
https://www.grobmeier.de/log4j-2-performance-close-to-insane...
And Spring Reactor uses the disruptor as it's default async processor.
Disruptor looks like great fit for IoT and msg-relay (think whatsapp) workloads
http://mechanical-sympathy.blogspot.co.uk/2011/07/false-shar...
Maybe that one is clearer for some.
EDIT: Just realized that the code is on GitHub - will have a look.
[1] http://grepcode.com/file/repository.grepcode.com/java/root/j...
https://github.com/LMAX-Exchange/disruptor/wiki/Performance-...
1: http://www.se-radio.net/2016/04/se-radio-episode-254-mike-ba...