Open ArniDagur opened 3 years ago
I've been thinking about this as well, io_uring
seems well suited for the torrenting use case. Thanks for the suggestion.
The decision here is going to be effected by whether we want to support windows or not. I'd be fine with linux only but there has been some interest in bringing cratetorrent to windows, so it's unclear whether this makes sense going forward. I would very much like to have cratetorrent as a base to experiment with io_uring
, though, maybe with the new tokio-uring
experimental crate.
Maybe there could be support for both windows and io_uring
via compilation switches, since the proposed API of tokio-uring
should be fairly similar to that of tokio
.
I'm currently writing a torrent client in C++ which uses io_uring (school coursework). I use it for both networking and file system operations. I must say that the experience has been great so far.
@ArniDagur sounds interesting. Would you mind digging into the architecture of your torrent client with regard to how it uses io_uring?
It might be interesting to use
io_uring
for asynchronous IO. It is Linux specific, but so ispwritev
andpreadv
.