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:

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.

有帮助吗?

解决方案

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.

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top