简体   繁体   English

Flask服务器在发生更改时通知WebClient

[英]Flask server to notify webclient when changes occur

I am building a server using Flask that will be called by a web client . 我正在使用Flask构建服务器,该服务器将由web client调用。

When a certain change occurs on the db my Flask app interacts with, I need the web client to be alerted so it can display the update. 当我的Flask应用与之交互的db上发生某些更改时,我需要向web client发出警报,以便它可以显示更新。

Would someone be able to give me some direction as to what I should be looking into with regards to both the Flask and web client sides? 关于Flaskweb client有人能给我一些指导吗?

Thanks. 谢谢。

The terminology you are using is a little confusing. 您使用的术语有些混乱。 I'm going to assume the web client is someone visiting your Flask app over the internet. 我假设网络客户端是通过互联网访问您的Flask应用程序的人。

Basically, if you want the ability for the server to push updates to the client you need to use websockets 基本上,如果您希望服务器能够将更新推送到客户端,则需要使用websocket

http://en.wikipedia.org/wiki/WebSocket http://en.wikipedia.org/wiki/WebSocket

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 通过套接字关闭服务器时通知客户端 - Notify client when closing server via socket 内部结构发生变化时打印sympy的整个表达式对象 - Print the entire expression object of sympy when changes in internal structure occur 模板文件更改时重新加载 Flask 应用程序 - Reload Flask app when template file changes 每当代码更改发生时,在django应用程序中添加uswgi.reload()函数的位置以重新启动服务器 - Where to add uswgi.reload() function in django app to restart the server whenever code changes occur 如何诊断 Python Flask 应用程序中仅在应用程序与 uWSGI 一起运行时出现的问题? - How do I diagnose problems in a Python Flask application that only occur when app is run with uWSGI? 使用uwsgi在服务器上的Flask应用程序上进行更改后没有任何反应 - Nothing happen after made changes on Flask app in server using uwsgi 将Flask更改应用到Apache2服务器,而无需重新启动 - Apply Flask changes to Apache2 server without restart flask应用程序未通过uwsgi和超级用户将代码更改应用于服务器 - flask app not applying code changes to server with uwsgi and supervisor 是否可以添加 postgresql 触发器以在表更改时通知我的 Django 应用程序? - Is it possible to add a postgresql trigger to notify my Django app when a table changes? 运行flask服务器时如何修复flask.cli.NoAppException - How to fix flask.cli.NoAppException when running flask server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM