Conversation

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
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
Replying to and
Yeah, I saw that. I just meant that in the context of the most popular web server, threads are largely good enough already. I would have thought that io_uring would have more to offer but scaling up the number of threads generally ends up offering comparable performance for it.
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