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

Веб-сервер cyclone и EventSource

Веб-сервер cyclone и EventSource

Александр Емелин

Про веб сервер cyclone + немного про EventSource - Server Sent Events, про то как можно доставлять realtime сообщения в браузер клиента даже если сайт написан на Джанго.

Moscow Python Meetup

September 20, 2012

More Decks by Moscow Python Meetup

Other Decks in Programming


  1. Cyclone + Eventsource
    realtime push-сообщения

    View Slide

  2. cyclone
    Alexandre Fiori

    View Slide

  3. View Slide

  4. View Slide

  5. https://github.com/fiorix/cyclone

    View Slide

  6. Server Sent Events (EventSource)

    View Slide

  7. View Slide

  8. var source = new EventSource("/sse/");
    source.onmessage = function(e) {

    View Slide

  9. View Slide

  10. id: 100532\n
    retry: 1000\n
    event: notification\n
    data: first line\ndata: second line\n\n

    View Slide

  11. cyclone + sse = cyclone-sse

    View Slide

  12. Async Non-blocking
    Broadcast SSE polyfill
    Long-polling HTTP Redis
    AMQP Last-Event-Id
    Dom Exception 18 Nginx

    View Slide

  13. [
    (u'cats', 946),
    (u'extras', 899),
    (u'dogs', 864),
    (u'base', 877),
    (u'general', 3586)

    View Slide

  14. View Slide