Rio
An experimental C++ async runtime framework (code name Rio) that lets users run CPU-bound tasks freely without introducing tail latencies. It uses a work-stealing architecture in which completion events can also be stolen: each worker thread runs its own io_uring registered to an eventfd, and a central stealer thread monitors all workers' eventfds and routes readiness events to idle workers—preferring threads that share a higher-level cache with the task—aiming for low, consistent latencies in lightweight C++ server applications.
What it addresses
Existing async frameworks (thread-per-core like Seastar/Boost.Asio, or work-stealing like Tokio) suffer reactor stalls or inconsistent latencies when tasks perform CPU-bound work such as protocol parsing, encryption, or compression; offloading these to thread pools adds syscall overhead and development complexity, making it hard to decide what to offload.
Shared over time
Each entry reflects what was shared on that date. Details may have changed since then.
Rio
An experimental C++ async runtime framework (code name Rio) that lets users run CPU-bound tasks freely without introducing tail latencies. It uses a work-stealing architecture in which completion events can also be stolen: each worker thread runs its own io_uring registered to an eventfd, and a central stealer thread monitors all workers' eventfds and routes readiness events to idle workers—preferring threads that share a higher-level cache with the task—aiming for low, consistent latencies in lightweight C++ server applications.
Problem: Existing async frameworks (thread-per-core like Seastar/Boost.Asio, or work-stealing like Tokio) suffer reactor stalls or inconsistent latencies when tasks perform CPU-bound work such as protocol parsing, encryption, or compression; offloading these to thread pools adds syscall overhead and development complexity, making it hard to decide what to offload.
Audience: Developers writing C++ server applications
Posted by @geertj · Original source ↗
Source text · @geertj · · Source ↗
I want to build a "tokio for C++" where the user can run CPU bound tasks freely without having to worry about introducing tail latencies. For now I gave it the code name Rio, but that may change.