Architecting an event-driven networking engine: Twisted Python

by
Tags:

Download (PDF, 3.09MB)

From the abstract: “How do you write and deploy an extensible, cross-platform, event-driven HTTP, SSH, or IMAP server in Python in zero lines of code? With Twisted!

Twisted is the granddaddy of event-driven Python networking libraries and has been a proving ground for how to structure such a framework for the last decade. In this talk, we’ll first orient ourselves with an architectural overview of the project. Then we’ll dissect key design decisions that make Twisted such a powerful tool for implementing network clients and servers, including:

  • The Deferred API for managing reactions to asynchronous events
  • Transport/protocol separation
  • Twisted’s plugin infrastructure

By the end of this talk, you’ll be well-versed in Twisted’s philosophy and the event-driven programming model, and know how to structure, deploy, and test Twisted clients and servers for any network protocol.”