How to implement reverse AJAX in a Django application?

How do I implement reverse AJAX when creating a chat application in Django? I looked at Django-Orbited, and, in my opinion, this puts a comet server in front of the computer. This seems great if I just start the Django development server, but how does it work when I start the application from mod_wsgi? How does the orbital server handle each request scale? Is this the right approach?

I looked at another approach (lengthy survey) that seems to work, although I'm not sure if everything will be involved. Will the client request a page that will live in its stream so as not to block the rest of the application? Will it even block? Wouldn't the script requested by the client request a continuous polling of information?

Which approach is more suitable? Which is more portable, scalable, normal, etc.? Are there any other good approaches to this (besides polling clients for messages) that I have missed?

+6
python ajax django comet reverse-ajax
source share
3 answers

How about using awesome nginx push module ?

+1
source share

Have a look at Tornado ?

Using WSGI for comet / long polling applications is not a good choice because it does not support non-blocking requests.

+1
source share

Nginx Push Stream Module provides a simple HTTP interface for both server and client.

The Nginx HTTP Push Module is similar, but seems to be no longer supported.

0
source share

All Articles