emitting Signal from server to the clients in Python Django like SignalR

django, python-2.7, signalr

Solution

Possible data flow diagram:

.

If you want to control the data that is pushed to your web clients from your Django app, you will need to use SignalR as a relay of sorts which can be hosted with an ASP.NET app.

The ASP.NET app can have REST endpoints accessible only to your Django app, and can then from there based on the REST parameters push messages to some or all of your clients. Example of doing this with ASP.NET MVC.

The SignalR Wiki can be a good resource for this. You will also need to EnableCrossDomain for this setup to work.

If you don't like the idea of setting up another server just to push data to your clients you might prefer a cloud-based offering like Pusher with a prebuilt wrapper around their REST API.

If you want to use Python to actually push to the clients you can use something like tornado.websocket, but that won't support browsers that don't support the final WebSocket spec.

Problem

I'm using Backbone.js and Python Django Combo. For checking user is authenticated or not, I'm using setTime out method and call a method which make ajax call to the server. I heard SignalR from my friend who is interested in .Net Technologies. This can emiting signal from server to client. So he say there is no need to poll periodically with signalR. Any help or idea will be appreciated.

Original source