Conversation

Rust async wasn't rushed, and pet theories for the one weird trick that would have made it work "correctly" are insulting to everyone who worked on it.
7
344
Honestly breaks my heart seeing those who pushed async all the way to the finish line slandered like this; in today's thread, and numerous threads prior, by people who are 100% wrong about the history and the feature itself.
2
81
Anyone can go on the internet and tell lies, and being smug armchair architects is a favorite bloodsport in our industry, but seriously shut up.
1
89
Replying to
Cross-platform async APIs in my opinion have one of the highest bars for running code and precise benchmarks next to a field like cryptography. They are notoriously hard to get right with tradeoffs everywhere
Quote Tweet
The kernel APIs are brittle and unforgiving and to the extent people can actually build cross-platform abstractions it's through blood, sweat, and tears. Nearly every attempt I've seen to second-guess decisions made by people in-the-trenches has ended in a breakage.
Show this thread
1
4
Replying to and
AIO for storage is also a lot different than the best way to deal with sockets. Making a portable abstraction for any of this involves many sacrifices, and I think at this stage it's hard to end up with a result that's not disappointing for Rust's niche.
Quote Tweet
Replying to @DanielMicay @raggi and @thinkingfish
I don't think it's possible to have an AIO library that's both good and portable right now. The whole point of Rust is having efficient abstractions mapping well to the low-level details. If it's not a thin abstraction over io_uring, it fails at being a good AIO library on Linux.
2
4
There's ongoing work on using io_uring. The main advantage is saving CPU and memory resources. It's not significantly faster for general usage. It's only really significantly faster for lots of small files where the overhead of working with the threads is significantly higher.
1
3
I'm sure it's a lot more compelling for something like a database. Thread pools work a lot better than people seem to think though. One caveat is nginx allows you to configure separate thread pools for different storage devices via the usual server/location block configuration.
1
2
I see a lot of problems with Rust's library ecosystem for AIO, etc. but the language portion of it seems really good. I don't really see the problem. I'm glad Rust went this way and I think the approach in Go is going to look like a clear mistake to most people in hindsight.
1
4
Show replies