Choosing a good asynchronous solution for Django projects

I'm currently using Django served on Apache (mod_wsgi) for developing my apps. One of my favorite things is to 'fake' async requests with JavaScript's setInterval() function and AJAX to retrieve new data from database. For example:

// javascript

function someFunction() {
    // do some stuff
    setInterval(function() { fetchNewStuff() }, 1000); // run fetchNewStuff() every second
}

function fetchNewStuff() {
    Dajaxice.main.fetch_new_stuff(fetch_new_stuff_callback, {'id':$(this).attr('user_id')});
}

function fetch_new_stuff_callback(data){
    // append new stuff to my table, list or whatever in HTML page
}

As far as I am aware, this is perfectly fine for my needs. However, as my apps are growing bigger and more complex, this will eventually become too much hassle for both, my server and my clients, no matter how much I try to minimize transported data. Also, I cannot settle with the thing that in today's world I'm still 'faking' this :) So, I'd like to find some 'real' solution with push capabilities for my current and future projects.

I did try to google my problem and I have found many interesting stuff (Tornado, Nginx, Node.js, Twisted, etc.) but most of tutorials/articles/blogs are at least 6 months old and I believe that many things changed in that time. So far, I have tried to test Tornado and it was successful test, but I had some problems with setting it up on my production server. I also tried Node.js which is extremely simple since I know JavaScript very good, but then again, I'm not sure if it is a good solution.

My question here is - what would be the best thing (server, platform, framework, whatever) to implement in my current and future apps depending on this conditions:

  • easy to use (e.g. Node.js could fit in here)
  • eliminate 3rd party stuff as much as possible (some out-of-the-box solution, e.g. Django+Websockets and that's it [this was really just a silly example])
  • good documentation in use with Django (it would be perfect to have some real examples with my new technology and Django since I'm pretty much n00b for web servers and related stuff)
  • has a good perspective and future (I'm really looking to learn something which I will use a lot and which I wouldn't have to re-configure very often)

Thank you for your thoughts and any kind of help about this (links to some good, recently updated readings are more than welcome :)

You should have a look at django-socketio project, a Django app providing the features required to use websockets with Django via Socket.IO.

It uses gevent library along with socket.io.