[英]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? 关于
Flask
和web 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.