Conference | Live Schedule | Talks | Get your ticket | Slides | Set your timezone
Distributed programming with coroutines and asynchronous communication frameworks

Johan Vanslembrouck
On Day 1 at 13:15 (CET/Berlin) in Track D online
This presentation will demonstrate how asynchronous communication frameworks, such as Boost ASIO, Qt, gRPC, ROS2, TAO, Windows overlapped IO, libevent, curl, and proprietary frameworks, can be used with a single coroutine library to write responsive, distributed applications in a uniform synchronous style.
The presentation will compare examples written with a subset of these frameworks, more in particular, Boost ASIO, Qt and gRPC. For each framework, I will compare an example that does not use coroutines with an example that uses coroutines, and (if supported by the framework) with an example that uses synchronous calls. With some frameworks, it is possible to maintain a synchronous coding style without the use of coroutines, in other frameworks, coroutines are indispensable to obtain this objective.
Cannot choose between using eager and lazy start coroutines or between eager and lazy start input/output operations? No problem. I will show how the same application code can be compiled in four different ways, so that you can compare the behaviour and performance of the four executables before committing to a configuration.
The applications that use coroutines are easier to write and are more readable, maintainable and extensible than applications not using coroutines. The reason is that the C++ compiler does a lot of the hard work that programmers otherwise must do themselves.
The source code of all examples is available on GitHub and runs on Windows 10/11 and on Ubuntu 22.04/24.04 or similar.
The presentation is an evolution of a presentation given for the Belgian C++ Users Group on December 2, 2025.
Please login to comment