Just wondering if anyone here is working on, or knows of, a callback oriented async runtime that can be used with sockets (ideally epoll, and friends)?
Might take a stab at it if it’s not already in the works, but want to see what’s available before I spend too much time on it.
Not sure how I didn’t find it in my first couple of searches: found this though.
Still interested in hearing people’s opinion on other libraries. Also, what’s the status on compiler-level async? I joined zig after it had been rolled-back, just curious what’s up with it.
I have an epoll based callback system for extreme low latency conditions that I wrote that specializes in event streaming with message sizes up to around 1k bytes (but works best when they are mostly below 300 bytes).
I was thinking of releasing it, but don’t know yet. It gets within 10% the latency target of the C++ one it is based on, so I still have some optimization work to do. I was never able to get that close in Rust with tokio and async (it was 25% off). I do still have do TLS/SSL, so that might hurt performance a little too. I’m just not sure how to do it yet. I might have to link openssl and write to its async api (always a huge mess ever time).
I am using event driven state machines.
Callback-oriented, epoll-based, sockets (or COM-ports), timers, signals, fs events, but I wouldnt call this “async”.
If you want “true” async ops, use io_uring.
here was an example of not so simple machine (connector to postgres dbms)
the only thing that you can do truly asynchronously (regarding sockets) with epoll (which is synchronous syscall) is establishing connection, you just get “ready for write” (EPOLLOUT) notification.