Overview
Explore techniques for writing concurrent applications with asynchronous I/O in this 32-minute Rust conference talk. Delve into the comparison between asynchronous and traditional synchronous approaches, examining how they impact application architecture. Learn to implement asynchronous I/O in multi-threaded concurrent applications, starting with a high-level overview before diving into code examples. Discover useful code idioms and best practices for designing ergonomic Rust APIs, including methods for storing callbacks with unique types, calling them from different threads, and achieving lifetimes shorter than 'static in threads. Gain insights from real-world experience in developing a Web framework using the asynchronous version of Hyper, with principles applicable to lower-level libraries and other protocol stacks.
Syllabus
Intro
Who uses asynchronous IO
Synchronous IO
Rust
Asynchronous IO
Advantages of asynchronous IO
asynchronous IO in Rest
Metal IO
Echo Server
Why Tokyo
Portal
Stream
Futures
Future CPU Pool
About Tokyo
Event loop implementation
Connection handling
Use case identification protocol
Invalid port
First solution
Problems
Tokyo Service
SimpleService
Conclusion
Taught by
Rust