3 ms·
> In practice, things are a bit more complicated. In fact, I don’t know of any async/await embedding on top of io_uring in any language yet, because it doesn’t
by vlovich123 1y ago
> In practice, things are a bit more complicated. In fact, I don’t know of any async/await embedding on top of io_uring in any language yet, because it doesn’t quite match this model. But generally, that’s the idea.
Glommio and monoio are async runtimes in rust on top of io_uring and Tokio has an optional io_uring backend. Does that not count? This is such a well researched article that this kind of statement makes me think I’m missing something - surprising the author would get this wrong.
- koakuma-chan 1y agoAs far as I know those libraries only implement basic things. They don't use registered buffers, registered file descriptors, etc, and don't implement advanced features like chained operations.
- ozgrakkurt 1y agoThey are async libraries built on io-uring though. Other mainstream async libraries also don’t go as deep as possible on epoll or other things either afaik
- Yoric 1y ago(author here) I didn't mention tokio's io_uring because, as far as I understand, it is unmaintained. I vaguely recall a conversation in which someone (a contributor?) was claiming that it was not possible to implement most of the features of tokio on io_uring due to conflicting models. [source needed], obviously. I will admit the very existence of glommio or monoio had entirely slipped my mind. I'll probably need to add a few paragraphs about thread-per-core runtimes. Thanks!
- yencabulator 1y ago> due to conflicting models The big one is this, and this will wreck a lot of pre-io_uring APIs: Historically, you pass in a buffer to read(2). There is one buffer per pending read. (And this is a scalability limitation.) With io_uring, you have a pool of buffers and a read completes by grabbing a buffer from the pool and putting the data there. io_uring highest-performance API is fundamentally at odds with the historical read API that was inherited from POSIX to just about every stdlib.
- lukeh 1y agoI wrote one for Swift a few years ago, not sure if anyone else is using it but I am! https://github.com/PADL/IORingSwift https://github.com/PADL/IORingSwift
- gpderetta 1y agoboost.asio as well seems [1] to have io_uring support, including registered buffers. It was experimental in 1.21; lots of fixes since, don't know if it is currently considered stable. Asio supports async/await, stackful coroutines and plain old manual continuation passing. [1] https://think-async.com/Asio/asio-1.36.0/doc/asio/history.html#asio.history.asio_1_21_0 https://think-async.com/Asio/asio-1.36.0/doc/asio/history.ht...