I'm familiar with PHP and MySQL, however I need to find a way to update a web page each time a value changes in my database asynchronously, with a Python backend, a Postgres database, and maybe Jquery / Ajax to handle the asynchronous part. I know MySQL doesn't support triggers on database changes and I believe Postgres does. Can anyone point me in the right direction? I think polling would be a resource expensive method of doing this.
Asked
Active
Viewed 1,693 times
2
-
You can use triggers and [the PostgreSQL notification system](http://www.postgresql.org/docs/9.1/static/sql-notify.html) to get async notices whenever anything happens, but I don't know how to integrate this with your frontend. – Daniel Lyons Mar 08 '12 at 07:03
1 Answers
3
At a specific interval of time, send a jquery ajax request from client browser and get the latest data from server. If data have been changed, then display the new data else leave it. You can do all this stuff in client side.
Here is is the thread that explains setting timer and doing a ajax call.