HNHacker News
TopNewBestAskShowJobs

nicholassm83

87 karma · joined April 20, 2024

submissionscomments
nicholassm83··on The LMAX Architecture (2011)
Here's a high level description in TLA+: https://github.com/nicholassm/disruptor-rs/blob/main/verific...

(Disclaimer: I wrote it.)

There's also a spec for a Multi Producer Multi Consumer (MPMC) Disrupter.

nicholassm83··on The LMAX Architecture (2011)
And here's a version in Rust: https://crates.io/crates/disruptor

(Disclaimer: I wrote it.)

nicholassm83··on Disruptor-rs: better latency and throughput than crossbeam
I'm trying to be polite. :-) And there is a lot of great C++ code and developers out there - especially in the e-trading/HFT space.
nicholassm83··on Disruptor-rs: better latency and throughput than crossbeam
I agree.

The Rust implementation even needs to use a few unsafe blocks (to work with UnsafeCells internally) but is mostly safe code. Other than that you can achieve the same in C++. But I think the real benefit is that you can write the rest of your code in safe Rust.

nicholassm83··on Disruptor-rs: better latency and throughput than crossbeam
I would love to give you a good answer but I've been working on low latency trading systems for a decade so I have never used async/actors/fibers/etc. I would think it implies a rewrite as async is fundamentally baked into your code if you use Tokio.
nicholassm83··on Disruptor-rs: better latency and throughput than crossbeam
I agree, the disruptor is more about low latency. And the cost is very high: a 100% utilized core. This is a great trade-off if you can make money by being faster such as in e-trading.