In yesterdays DjangoCon BDFL Keynote Adrian Holovaty called out that Django needs a Real-Time story. Well, here's a response to that: django-sockjs-tornado
Immediately after the keynote I went and found a comfortable chair and wrote this app. It's basically a django app that allows you to run a socketserver with
manage.py like this:
python manage.py socketserver
Now, you can use all of SockJS to write some really flashy socket apps. In Django! Using Django models and stuff. The example included shows how to write a really simple chat application using Django models. check out the whole demo here
If you're curious about SockJS read the README and here's one of many good threads about the difference between SockJS and socket.io.
The reason I could write this app so quickly was because I have already written a production app using sockjs-tornado so the concepts were familiar. However, this app has (at the time of writing) not been used in any production. So mind you it might still need some more love before you show your mom your django app with WebSockets.
- django-mongokit now compatible with Django 1.4 11 August 2012
- Introducing: League of Friends on Around The World 15 September 2012
- Related by category:
- Related by keyword:
- Are WebSockets faster than AJAX? ...with latency in mind? 22 April 2012
- WebSockets vs. XHR 2019 5 May 2019
- Using Fanout.io in Django 13 December 2016