Skip to content Skip to sidebar Skip to footer

Understanding Long Polling: Client (android) And Server (asp Net)

I'm developing android application where users can compete in some kind of battles. On the server side I need to receive requests from user for starting a battle, and then, using s

Solution 1:

This might not be the answer you are looking for, but why do you want to go for long polling. you can do the "pull" kind of polling for this type of notifications IF you are only polling when the users are engaged in battles. This way battery life will also be saved. When the battle starts, start a background service, which polls the server every 2-3 seconds(hope a latency of 2-3 seconds is acceptable). And notify the user accordingly. Then stop the service when the battle is over. This will be far more easier to implement. But if you need instantaneous notification, you can use Google Cloud Messaging Service(it is a form of long-polling). To know more about how it works, see this

Solution 2:

I am not sure, if you have considered WCF.

Take a look onto this, see if it helps you. http://anthymecaillard.wordpress.com/2012/06/06/wcf-real-time-web-development-with-long-polling/

For client: Use Jquery, with progress wheel showing till our response is back from the server

Post a Comment for "Understanding Long Polling: Client (android) And Server (asp Net)"