Search code examples
djangotornadopusher

What are the advantages (or needs) of using tornado with Pusher for a Django application?


We are a small team starting to plan how to develop a chat service in Django using Pusher to push the messages in real time.

So far we understand that we need an asynchronous way of pushing the messages to the Android and web browsers clients and we've chosen a hosted solution (Pusher) instead of implementing our own, probably using sockjs and tornado. We thought we didn't need Tornado for anything now that we have Pusher!.

In the Python module documentation (https://github.com/pusher/pusher_client_python) there is only small mention to Django, there is however a Tornado section which says:"To use the Tornado web server to trigger events... ". So we wonder why would we need or what use does it have to use Tornado to Trigger the events from our server to Pusher.

Thanks in advance.


Solution

  • The only scenario I can imagine is when you need to trigger multiple messages at once, then tornado being asynchronous is obviously more beneficial then django (or any other synchronous web framework), since the latter would have to trigger message and wait for response every time.