Matthieu Wipliez - Techniques for writing concurrent applications with asynchronous I/O

preview_player
Показать описание
This talk is about asynchronous I/O: how asynchronous compares to the traditional synchronous approach, how this changes the architecture of applications, and how to do asynchronous I/O in a concurrent multi-threaded application. Starting from a high-level view, we will then dive into code to explore useful code idioms and how to design ergonomic Rust APIs. This will include for instance how to store callbacks with unique types and call them from different threads, how to get lifetimes shorter than ‘static in threads and the associated benefits.

I am doing this talk based on the experience I gained developing a Web framework on top of the asynchronous version of Hyper, the most used HTTP library for Rust. Principles should apply to lower-level libraries and other protocol stacks as well.

---

Help us caption & translate this video!

Рекомендации по теме
Комментарии
Автор

The synchronous/asynchronous slide is wrong and the explanation very weak.
Synchronous means e.g. if you read from a socket then you wait for the operation to complete.
Asynchronous means you just start the operation, do some other operations and finally handle the result of the operation after it completed.

This has nothing to do with threading.

What the slide seems to show are some kind of server architectures or I/O models which may involve threading.
On the left there seems to be a request-to-thread mapping, which doesn't scale.
On the right I have no idea what's happening. It makes no sense.

xnoreq