Are there recommended best practices for polling the warning server for new warnings?
When a new hour ticks over, but before the next warning event occurs, the warning .txt file associated with the new hour hasn't yet been created. Is it better to perform a poll by attempting to download the new hour's warning file, and taking an HTML status code response of "404 Not Found" to mean "everything's fine, but no new warning have occurred yet in the current hour"? Or, is it better to perform a directly listing, and check to see if the new hour's warning file exists yet?
Seems like the first option would minimize the bandwidth usage, but I don't know the impact on the server of generating repeated 404 's. Does that make the server grumpy?
Also, do you have rules on the minimum interval between pollings?
By the way, I realize the ultimate solution is to subscribe to the server-side events feed. I do intend to eventually do that, but I'd like to initially use polling, simply to get something implemented as quickly as possible.
Thanks so much.
0 comments
Please sign in to leave a comment.