Comet with ASP.NET AsyncHttpHandlers
- by Sumit
I am implementing a comet using AsyncHttpHandlers in my current asp.net application. According to my implementation client initially sends Notification Hook request to server (with its user id) on AsyncHttpHandler, and on server side I maintain a Global (Application level) dictionary of userid(key) and IAynsResult (value). So when ever a request is received to send notification to a user I just pick the matching IAsyncResult from the Global Dictionary and send response to the client user.
My concern is, is maintaing a Dictionary of Userid and IAsyncResult at Application level a good design? I feel it will put a lot of load on the server, at the time of high traffic.
Is there any other way I can achieve the comet. or what will be the good design to achieve comet for high traffic scenarios.