The talk will start with an overview of async/await syntax introduced with PEP 492 in Python 3.5. We’ll go through asynchronous context managers and iteration protocols it introduces. I’ll briefly explain how the feature is implemented in CPython core.
Then we’ll explore asyncio design. I’ll briefly cover event loop, policies, transports, protocols and streams abstractions. I’ll explain that event loops are pluggable, which really makes asyncio a universal framework.
We’ll cover libuv - a high performance networking library that drives NodeJS. I’ll highlight where it’s similar to asyncio and how it’s different.
In the final part of the talk I’ll explain how to make an asyncio compatible event loop on top of libuv. I’ll showcase Cython, which is an amazing tool for tasks like this.
Finally, I’ll share some ideas on how we can further improve the performance of asyncio and networking in Python, and what are the challenges that we will face.
Objectives: