PyCon Pune 2017

A conference on the Python programming language

PyCon, the gathering for the community using and developing the open-source Python programming language. This is the first year of the PyCon Pune where the community will meet for two days of talks and working on upstream projects in two days of dev sprint. CFP ends on 30th November AoE.

Hosted by

PyCon Pune 2017 more

Deven Bhooshan

@devenbhooshan

Realtime django - Channels to rescue

Submitted Nov 24, 2016

Implementing websockets in django was hard before Django channels
At its core, Django is built around the simple concept of requests and responses: the browser makes a request, Django calls a view, which returns a response that’s sent back to the browser. The view is only around for lifetime of request and there’s no mechanism to hold open a connection or send data down to the client without an associated request.

Earlier there was no standard implementation of websockets built right into django. We were supposed to use external libraries like dragon swarm, pusher etc. There was lot of work involved at developer side just to understand the nitty gritty details of the libraries.
So this is where django-channels came to rescue.
The whole idea of this talk is to know how to build scalable realtime application using websockets in django. For that, We will discuss how django-channels are going to help us in achieveing it.

Outline

The talk is going to cover two different “eras” of building realtime applications in django

  1. Pre “channels” era
  2. Post “channels” era

This include

  • How current request response cycle works in django(without django-channels)
  • Why implementing websockets currently is hard
  • How easy is to use django-channels to build scalable realtime applications
  • A short demo

Speaker bio

I am the cofounder of MindIQ. At MindIQ, we use django-channels to push realtime data to our clients used by 1000+ businesses globally.

Comments

{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hosted by

PyCon Pune 2017 more