4 ms·
Before anyone says something about Django not being hip enough for realtime stuff, just know that you can layer Pushpin (http://pushpin.org http://pushpin.org)
by jkarneges 11y ago
Before anyone says something about Django not being hip enough for realtime stuff, just know that you can layer Pushpin (http://pushpin.org http://pushpin.org) in front of it. This may sound like a bandage but it's actually good design, regardless of programming language.
Disclaimer: author.
- simonw 11y agoI'm a big fan of the design of pushpin - it's a really elegant solution for adding real-time features to frameworks like Django. I don't think it feels like a band-aid at all: for most web programming tasks, I'd much rather think in terms of a standard request/response cycle - it makes scaling with a shared-nothing architecture much easier to reason about.
- iyn 11y agoI didn't hear about Pushpin before, looks like a solid product, will definitely look into it. I'm not sure if that's a valid question, but how does the Pushpin compare to something like SwampDragon (http://swampdragon.net/ http://swampdragon.net/), besides not being tied to Django?
- jkarneges 11y agoSwampDragon is a more comprehensive solution. It comes with a JS client and lets you define data models. Pushpin is lower level. It has no client protocol nor client library and handles various push primitives on behalf of the backend. If you want to add realtime endpoints to an existing Django project, or if you want to build an API, then Pushpin may be preferable. SwampDragan may be preferable for new, non-API projects. It might be cool to see the two projects integrate somehow, since they actually sit at different levels in the stack. There could be value in SwampDragon being able to delegate push responsibility to Pushpin.
- ergo14 11y agoI'm doing my own thing called channelstream: https://github.com/AppEnlight/channelstream https://github.com/AppEnlight/channelstream It's gevent based and supports websockets and long-polling, by design it integrates with any kind of application for real-time broadcasts, be it django, php, cron scripts etc.
- jsmeaton 11y agoAndrew Godwin (the author of django migrations and south before that) is working on something he calls Django Channels http://channels.readthedocs.org/en/latest/ http://channels.readthedocs.org/en/latest/ . The aim is to bring it into core (possibly for 1.10), which will allow real time features. The traditional request/response cycle will then just become producers and consumers of a "request" channel.
- japhyr 11y agoThis is great to hear. I learn a lot from watching how the Django team brings critical third-party projects into the core of Django.
- ipmb 11y agoI haven't tried Pushpin yet, but we're using the Nginx push stream module on https://botbot.me https://botbot.me in a similar manner. It acts as a reverse proxy to the Django app and also handles the realtime connections.