We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

High Performance Networking in Python

Formal Metadata

Title
High Performance Networking in Python
Title of Series
Part Number
27
Number of Parts
169
Author
License
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Yury Selivanov - High Performance Networking in Python The talk will cover new async/await syntax in Python, asyncio library and ecosystem around it, and ways to use them for creating high performance servers. It will explain how to build custom event loops for asyncio, with an example of using the libuv library with Cython to achieve 2-3x performance boost over vanilla asyncio. ----- 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:** 1. Deeper understanding of async/await in Python and why it's important. 2. Deeper understanding of asyncio architecture and protocols. 3. How to improve asyncio performance by implementing custom event loops. 4. Show that it's easy to integrate existing complex & low level libraries with Cython. 5. Some perspective on how Python may evolve wrt networking.