The author, Arun Ravindran made a really good job at evaluating the current state of realtime capabilities of django.
Unfortunately, like many other django enthusiasts, he seems to have overlooked the latest uWSGI features.
OK. uWSGI does not really brings realtime to django, but it actually makes it a lot more simple and a lot less hackish and requires less moving parts.
uWSGI now support websockets out of the box. Even better, you can route websockets traffic and standard REST traffict throught the same port !
Implementing it couldn't be any more simple:
defapplication(env,start_response):# complete the handshakeuwsgi.websocket_handshake(env['HTTP_SEC_WEBSOCKET_KEY'],env.get('HTTP_ORIGIN',''))whileTrue:msg=uwsgi.websocket_recv()uwsgi.websocket_send(msg)
And here's how you serve a websocket or a standard wsgi application depending on the requested path:
You could also use the awesome routing capabilities of uWSGI to pick the right WSGI interface. The possibilities are endless. You could even serve a node or a PHP project along with your django project using the same uWSGI process.
As if it wasn't awesome enough yet, it also support unshared context (read cheap and lightweight containers) which makes it possible to isolate your application(s) at OS level. This effectively makes tools like docker and lxc useless.
I think what will truly make a difference in terms of django being future proof or not is its capacity to adapt to the real challenges of real time applications.
First django was designed from ground up as a rest framework. For example, the ORM wasn't designed to stay connected indefinitely to the database backend
and this leads to some headache inducing problems. As far as I know, the current state of affair imply instanciating and dropping the database connection
at every roundtrips.
Also django handle concurrency optimistically, which is somewhat fine when your application is works on request based transactions. But in a real time world it
will soon lead to problems and worst, it will never scale.
Scaling is important, even if you don't plan to. The best frameworks let you start working and think of your scaling problem later without too much headaches.
That's what django does.
Your site is slow ? Enable a caching strategy. Put your database on a different server, use a CDN to serve your media and so on. Django as already many scaling options in its toolbox so you don't have to worry about it (too much) in the early stage of development.
But if you want to scale in real time, now you have to not only distrute your application, but also its state. And this is a lot harder than it seems, trust me.
Don't get me wrong, these are all really interesting subjects, but they are also really hard to implement right in a generic and reusable way. And I think this is where django should start building its real time foundations.
In my humble opinion, if django can provide rock solid and scalable distributed concurrency out of the box, then it might stand a chance in the long run. If it doesn't, it will become the PHP of real time.
As in "Well, of course you can do it with django, but you're gonna have a real bad time".
Every other roadblocks are technicallities or low hanging fruits.