I am pretty a new comer to web design. Recently I've been creating a site using Django. I had been very thinking about applying websockets within the site. To do this I had been using django-socketio (on git hub at https://github.com/stephenmcd/django-socketio). All of this was working fine using gevent's pywsgi server that is recommended within the django-socketio documents.

From reading through some books on django it appears that it's recommend to make use of Django with Apache and mod_python for deployment. Right now I'm unclear about the easiest method to start getting Django, Apache and websockets together. Must I be utilising the pywsgi server to handle django-socketio electrical sockets running with apache for everyone the relaxation from the project? It is possible to means by which Apache are designed for everything? Must I simply not use Django-Socketio? I would love to make use of Django and Apache because I understand just a little about the subject. Which is much more than I understand about other things :D

Anyway my real question is really if anybody knows worthwhile articles or documentation on using Django-socketio and Apache in order to get my mind round the subject?


To begin with, whatever you read recommending mod_python is extremely out-dated. It's no more developed and mod_wsgi may be the right approach when utilizing Apache.

So far as I am aware, mod_wsgi does not support the kind of open connections needed by WebSockets. A fast explore Google implies that you will find methods for getting WebSockets working under Apache, but regarding how good that will use the gevent/django-socketio stack is one thing you'd have to consider.

I recommend using gevent's server when i suggested within the django-socketio paperwork, to handle the WebSocket connections. Benchmarks ought to be taken having a touch of suspicion, but when you have a look at these results you will find gevent to become on componen with mod_wsgi.

django-socketio offers the ease of allowing you to serve the WebSocket connections in addition to regular Django sights via a single application instance. In the event that does not suit you, you can implement these separate projects, and run the standard Django part under Apache/mod_wsgi.