Thank you.
The short answer is: don't.
The longer answer is: Your room only holds 200 people, so at some
point someone will be out of luck. You just need to make sure that if
someone starts a serious attempt to book a seat (as opposed to just
browsing around), that he can complete the process in the assurance
that he'll get a seat/the number of seats he want. Therefor have a
'check for availability' step early (first?) in the booking process
and make a temporary reservation for that person for say 5-10 minutes
so that he can complete the booking process. Make sure to inform the
user of the duration of this temp reservation.
Rgds,
Jeroen
1) You can use a meta refresh so that every, say, 30 seconds, the page
reloads itself.
2) You can use Ajax to lookup if someone has registered every 30
seconds and then update the display based on the new data (or not if
there is no new data).
Unfortunately, there is no way to have it be instant. For example, 1
person signs up and then the server pushes an update to everyone on
the site. This is because HTTP is stateless. The server has no idea
whether anyone using the system is still using the system. When you
visit a site, your browser says to the server "hi! i want this page"
and the server says "cool, here it is!" and then there is no
communication between them until you request something new. The
server has no idea whether you're staring at the screen, whether
you've closed the window, whether you've shut down your computer,
etc. As such, the server can't know who's still there to push data
to.
Suffice it to say, your best option would probably be to use Ajax to
send a request to the server and then update the data from the
response, but you will have to do it timed - you could pick every 5
minutes or 5 seconds, but do realise that your server and the person's
browser has to be sending and processing data when these requests
happen.
Good Luck!
In general, you don't -- this is a limitation of HTTP, because once
you send out the response, you've sent out the response. You don't get
to send any more data until a new client request comes in.
Using a meta refresh is somewhat hackish, but would force a periodic
reload for anyone who's just sitting there looking at the page.
Similarly, firing off an occasional XMLHttpRequest to fetch updated
data will work, and is a bit cleaner.
There's also Comet, which is a method coming out of the folks behind
the Dojo JavaScript toolkit, and which is based on servers keeping
long-lived HTTP connections open so they can keep sending data down
the wire, but unfortunately the load of supporting even a few clients
in that fashion can quickly murder your server.
--
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."