I need to use ajax polling to update a page as soon as a value in the mysql database is changed. The polling will only happen on one page of the website and only like 1-10 people have access to the page at a time. Ideally, the ajax would call the php function every second, but does that strain the server any? I could live with like 20-30 second intervals if needed. Also, I read an article on long polling (comet) vs. regular. Does my situation call for long or regular? Regular seems easy to set up with jQuery.
comet is still very complicated to implement.
if you can build a static page everytime the db is updated, it will be far easier on your server. you can use simple HEAD requests to espablish when the data changed, saving the download of a file every second. heads usually bounce back in one packet.
you can run head every 5 seconds, and immed DL if the data changed.
super easy to set up and configure and even has an optional decay feature built in.
Thanks, I guess I'll use like a 10 second interval. Also, I life jquery more than prototype, so I'm going to search for one of those plugins.