Talk Proposal Submission

If you are interested in attending this talk at PyCon JP 2017, please use the social media share buttons below. We will consider the popularity of the proposals when making our selection.


Primer on using WebSockets in Django(en)


Michal Nakoneczny

Audience level:



Web Frameworks


I give a basic introduction to WebSockets and share some of my experiences from using Django-Channels for pushing data from external sources to the user in near real-time on a production scale. Rather than following the often-discussed example of a chatroom, I show how WebSockets can be used for handling backend events that origin at the models, querysets or even management commands level.


Attendees should be able to implement WebSockets using Django-Channels in their new and existing projects even if they had no previous experience with the technology. Their understanding of the applicable use-cases should be significantly wider than if they only followed Django-Channel's documentation or tutorial


The talk will start with a discussion of the standard request-response cycle in web application and show its current limitations in order to present how the WebSockets specification attempts to solve the problems. First, a brief history and current state of the WS spec is presented. Second, the choice of Django-Channels as a library to implement WS in a Django projects is defended. Third, I show how the newly introduced concepts of Consumers, Channels, and Messages correspond to Django's Views, Request, and Responses. Finally, I walk the audience through a simple but working example putting all the presented concepts into practice. Finally, I want to point the audience to some common problems that we have encountered while running commercial, production-scale systems and share our solutions to them.
  • このエントリーをはてなブックマークに追加