Better HN
topnewbestaskshowjobs
Log inSign up

nicholassm83

87 karma · joined Apr 20, 2024 (2y ago) · 9 submissions

Submissions

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

And here's a version in Rust: https://crates.io/crates/disruptor

(Disclaimer: I wrote it.)

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

7.

Disruptor-rs: better latency and throughput than crossbeam(github.com ↗)

204 points · by nicholassm83 · 2y ago · 35 comments

8.

Rust - Low Latency Alternative to Crossbeam for Trading Applications(crates.io ↗)

2 points · by nicholassm83 · 2y ago · discuss