Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Real Time Web with Django Channels

Real Time Web with Django Channels

The talk will introduces the Channels concept, explains how they work and shows a few examples of what’s now possible (or plain easier) to do with them.

Senko Rašić

November 08, 2016
Tweet

More Decks by Senko Rašić

Other Decks in Programming

Transcript

  1. Daphne Django message message ASGI WSS upgrade WS frame HTTP

    WS frame WS frame WS frame message message message disconnect message
  2. Daphne Django message message ASGI WSS upgrade WS frame HTTP

    WS frame WS frame WS frame message message message disconnect message Django Django Django Django Django
  3. Interface Server Worker server ASGI HTTP Channel Layer Worker server

    Worker server Interface Server HTTP ASGI ASGI ASGI ASGI
  4. Interface Server Consumer (View) HTTP GET ASGI http.request Interface Server

    HTTP response ASGI http.response!abc HTTP request handling
  5. Interface Server Consumer WS socket ASGI websocket.receive Interface Server WS

    socket1 ASGI websocket.send!abc WebSockets handling Interface Server WS socket2 ASGI websocket.send!def
  6. That’s all, Folks! See also: Reinventing Django for the Real-Time

    Web https://www.youtube.com/watch?v=2sEPipctTxw
  7. Image credits: Darth Vader - https://www.pinterest.com/jaclynnpetersen/star-wars/ Trabant - https://en.wikipedia.org/wiki/Trabant Rube

    Goldberg Machine - https://en.wikipedia.org/wiki/Rube_Goldberg_machine Meditating Monk - https://www.flickr.com/photos/aigle_dore/24065839299 Flying DeLorean - http://mugen.wikia.com/wiki/Delorean