I am looking to create a website that can notify users about events happening on the server. Here is my proposed plan:
- Send an asynchronous request to the server (ASP.NET) with a 600-second time-out
- If an event occurs on the server within those 600 seconds, the server will respond with event details
- If no event occurs within the time frame, the server will send a 'no event' response after 600 seconds
- JavaScript will process the server's feedback and send the next request accordingly
However, a potential issue with this approach is that a large number of visitors may lead to a high volume of 'pending' requests on the website.
Questions:
Is this pending request issue a problem? What solutions could address this challenge? Should I consider implementing a different approach?
Your advice and feedback are greatly appreciated.