the situation i'm facing is:
i have a php+mysql web application. several users share resources in the same database. i want to implement a feature that whenever there is a change for database records(create,update or delete), other users will be notified instantaneously.
I'm considering to use ajax push engine (APE), but not sure how the big picture is.
(1) is it something like i need a script constantly checking the last_update timestamps and send notifications to client when a new change is detected?
OR
(2) every time after performing any operation to database table, send notification to clients, telling them to reload data?
which one is better or any other suggestions on how to implement this?
thanks in advance!
You can use
comet
library for this.http://ajaxian.com/archives/comet-with-php
http://www.zeitoun.net/articles/comet_and_php/start