Don't Overreact: Moving from Twisted to Asyncio

11:15 AM - 12:10 PM on July 17, 2016, Room CR6

Brian Muller

Audience level:
advanced
Watch:
https://www.youtube.com/watch?v=ZKnETCH4S0w

Description

This talk covers the basics of the Twisted and Asyncio libraries for asynchronous I/O and then delves into an experience porting the Kademlia distributed hash table (DHT) library from Twisted to Asyncio. The talk will start with a high level discussion of asynchronous I/O and describe some example cases where it might be useful. Concrete examples in both Twisted and Asyncio will be provided to demonstrate two different approaches to asynchronous libraries. Then, in the primary focus of the talk, the process, challenges, and lessons from converting a complex library from Twisted to Asyncio will be covered. This will include covering cases when a conversion should and shouldn't be undertaken, along with advice for anyone who wants to convert an existing library.

Abstract

With the inclusion of the asyncio library in Python 3, many assume that the utility of libraries like Twisted will no longer be necessary. This talk will cover the basics of each library, including distinct similarities and differences, and then spend most of the time reviewing the experience porting a complex distributed hash table library (Kademlia) from Twisted to Asyncio.