Question

Im currently developing a sports webapp which needs to get realtime updates.

In the application every judge needs to enter some records based on a table in the browser. In this table they enter the grades and wait until all other judges entered their grades. When all grades are saved the application should switch to the next table, where the judges need to fill out.

I'd like to use HTML5 server send message technique, becuase I'm not really a fan of pooling client side.

The problem I've now is how do I get realtime updates of the mysql table in php to send the status to the clients.

Or should I use a loop in the php script which always ask the db for updates after a short sleep. Would it be to much load for the db-server?

Was it helpful?

Solution

For this special case i recommend you trying out Node-JS. It can be quite hard for JS-beginners to jump in but this is as far as i know a good way to solve (pseudo-)realtime stuff.

Node.js provides good ability to handle automated process.

OTHER TIPS

You should read about and implement push notifications with sockets. Those will let you know when there were some records added, changed etc, so you can change your program workflow accordingly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top