简体   繁体   中英

Python, Postgres and Ajax/ Jquery update page realtime with databse values

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM