ALTERNATE UNIVERSE DEV

Podcast.__init__

Django, Channels, And The Asynchronous Web with Andrew Godwin

Summary

Once upon a time the web was a simple place with one main protocol and a predictable sequence of request/response interactions with backend applications. This is the era when Django began, but in the intervening years there has been an explosion of complexity with new asynchronous protocols and single page Javascript applications. To help bridge the gap and bring the most popular Python web framework into the modern age Andrew Godwin created Channels. In this episode he explains how the first version of the asynchronous layer for Django applications was created, how it has changed in the jump to version 2, and where it will go in the future. Along the way he also discusses the challenges of async development, his work on designing ASGI as the spiritual successor to WSGI, and how you can start using all of this in your own projects today.

Preface

  • Hello and welcome to Podcast.__init__, the podcast about Python and the people who make it great.
  • When you’re ready to launch your next app you’ll need somewhere to deploy it, so check out Linode. With private networking, shared block storage, node balancers, and a 40Gbit network, all controlled by a brand new API you’ve got everything you need to scale up. Go to podcastinit.com/linode to get a $20 credit and launch a new server in under a minute.
  • Visit the site to subscribe to the show, sign up for the newsletter, and read the show notes. And if you have any questions, comments, or suggestions I would love to hear them. You can reach me on Twitter at @Podcast__init__ or email hosts@podcastinit.com)
  • To help other people find the show please leave a review on iTunes, or Google Play Music, tell your friends and co-workers, and share it on social media.
  • Join the community in the new Zulip chat workspace at podcastinit.com/chat
  • Your host as usual is Tobias Macey and today I’m interviewing Andrew Godwin about Django Channels 2.x and the ASGI specification for modern, asynchronous web protocols

Interview

  • Introductions
  • How did you get introduced to Python?
  • Can you start with an overview of the problem that Channels is aiming to solve?
  • Asynchronous frameworks have existed in Python for a long time. What are the tradeoffs in those frameworks that would lead someone to prefer the combination of Django and Channels?
  • For someone who is familiar with traditional Django or working on an existing application, what are the steps involved in integrating Channels?
  • Channels is a project that you have been working on for a significant amount of time and which you recently re-architected. What were the shortcomings in the 1.x release that necessitated such a major rewrite?
    • How is the current system architected?
  • What have you found to be the most challenging or confusing aspects of managing asynchronous web protocols both as an author of Channels/ASGI and someone building on top of them?
    • While reading through the documentation there were mentions of the synchronous nature of the Django ORM. What are your thoughts on asynchronous database access and how important that is for future versions of Django and Channels?
  • As part of your implementation of Channels 2.x you introduced a new protocol for asynchronous web applications in Python in the form of ASGI. How does this differ from the WSGI standard and what was your process for developing this specification?
    • What are your hopes for what the Python community will do with ASGI?
  • What are your plans for the future of Channels?
  • What are some of the most interesting or unexpected uses of Channels and/or ASGI?

Keep In Touch

Picks

Links

The intro and outro music is from Requiem for a Fish The Freak Fandango Orchestra / CC BY-SA

Episode source