4 ms·
could anyone suggest where to learn enough network programming in C/Linux to be able to have the necessary background to start using io_uring? After working on
by znpy 4y ago
could anyone suggest where to learn enough network programming in C/Linux to be able to have the necessary background to start using io_uring?
After working on one of our internal pieces of software, I have a strong hunch that io_uring could boost its throughput, and I'd like to have a PoC, but low-level network programming is definitely outside my areas of expertise.
Any suggestions ?
- hedora 4y agoFind a tutorial that explains how to implement an async runtime on top of epoll using C++20 coroutines. In that context, it is probably easier to use io_uring correctly than epoll.
- unmole 4y agoBeej's Guide to Network Programming: https://beej.us/guide/bgnet/ https://beej.us/guide/bgnet/
- mariusor 4y agoI just went through this recently, and it vastly predates io_uring functionality, I don't remember even mentioning it. It's a good place to learn socket programming using the POSIX sockets API, but that's it.
- unmole 4y agoThe GP asked for resources to understand low level network programming.
- mariusor 4y ago...relevant to io_uring. I was just clarifying that Beej's guide is not really that.
- benwills 4y agoAs someone who has written a fair amount of networking code in C, I'd assert that without an understanding of what's in Beej's guide, it will be nearly impossible to competently use io_uring in a networking context.
- weird_user 4y agoI think you need to learn basics like the event loop first before jumping into io_uring. You might be interested in my book[1] which teaches network programming. [1] https://build-your-own.org/redis/ https://build-your-own.org/redis/
- znpy 4y agoone thing is not clear from the website: the pages in the content section (say https://build-your-own.org/redis/02_intro_sockets https://build-your-own.org/redis/02_intro_sockets ) are a shortened version of the pages in the epub/pdf/paperback version?
- weird_user 4y agoThe web pages are the full version. It's a condensed book.
- znpy 4y agoi see, thanks!
- signa11 4y agoimho, the best resource for this is unix-network-programming from stevens. i would recommend that you start with his tcp-ip-illustrated-vol-1 first, and then progress from there. other resources are more of a 'tactical' nature, while what you need is something more strategic.