I am writing an application which needs "near real-time" updates from a browser app. The other requirement is that it use as little as possible bandwidth (so polling is not an attractive option). My idea is to use an XmlHttpRequest
and just let the server wait to respond to that request until there is something to send back. This could be anywhere from seconds to 8-12 hours.
Questions:
- Is an XmlHttpRequest going to wait that long for a response?
- Is my ASP.NET MVC service (hosted under IIS7) going to allow a request to sit that long?
- What would be the maximum number of users a server could support under this configuration? Are we going to run out of threads in the thread pool before we get a reasonable number of people with open requests?
- Is there a better way to fill these requirements?