Part 3. Advanced topic: Async Rust

 

The third part of this book covers three advanced topics that are not directly related to the tutor web service and web app that we have built so far, but that are important topics for anyone interested in building complex Rust servers and preparing them for production deployment.

Chapter 10 is devoted to asynchronous programming. Although not new, asynchronous (or async) programming remains a hot topic today because it is of the utmost importance in modern systems. Async programming allows developers to make the best possible use of computing resources when data processing activities vary widely in time or when there is latency in the system. Async programming is all the more significant for distributed systems. We’ll start with a brief overview of concurrent programming and then look at examples of how to write multithreaded versus async programs in Rust. We’ll delve deep into Rust’s async primitives, such as futures, and see how to write async programs in Rust from first principles.