Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the best socket.io server for use with Django - gevent or tornadio2?

I'm working on a WebApp using backbone.js and socket.io on the client side, and Django on the server side. I'd like to do "push" from the server when data changes (just like in a chat app). I came across two implementation of socket.io in Python with a Django integration that looked promising:

  • django-socketio which is based on gevent and gevent-socketio
  • Tornado-based integrations that use torandio2 such as tornadio-with-django and django-tornadio

Both gevent and tornado have very good performance, so I'm not interested in other async connection frameworks. The only other requirement is the use of SSL for the connection - no plain text transmission.

So between these two approached, which would be the easiest to implement? Is there a good subscription-based framework for tornadio2 similar to how django-socketio does it for gevent?

Another option I came across is django-serverpush, which is also based on TornadIO2. It better integrates with Django than the other TornadIO2 apps, but the implementation still needs some improvement before it becomes production-ready.

like image 379
Tony Abou-Assaleh Avatar asked Feb 20 '12 19:02

Tony Abou-Assaleh


2 Answers

At the time of writing this answer, django-socketio still hasn't been fully upgraded to work with the latest socket.io.

Tornado/TornadIO2 on the other hand are well maintained, and with a few custom extensions I was able to get them up and running very nicely. After I launch my product, I'm hoping to spend some time to open-source my modifications. Until then, I'd be happy to answer any questions on how to get this running.

like image 115
Tony Abou-Assaleh Avatar answered Oct 19 '22 02:10

Tony Abou-Assaleh


Honestly I'd say they're pretty similar. This is more of an opinion. For performance I think gevent has more performance based on what I've read, but you should do your own tests to find out which has highest performance.

like image 23
stormlifter Avatar answered Oct 19 '22 01:10

stormlifter