数据库中发生更改时在前端进行实时更新 [英] Real time updation in front end when changes occur in database
本文介绍了数据库中发生更改时在前端进行实时更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
数据库记录更新或更改时如何更新前端ui
How to update front end ui when database records updates or changes
示例推特Twitter帖子动态地增加了喜欢的人数
Example Twitter Twitter post dynamically gets increased no of likes
用于这种实时更新的技术将是什么?
What is the technology we shall use for this kind of real time updates and what is the way
另一个示例火力基地Firebase记录中的某些内容更新时自动前端ui更新
Another example firebase When something updates in firebase records Automatically front end ui updates
请有人帮我破解这个问题
Please could someone help me to crack this
推荐答案
有许多解决方案可将数据从服务器推送到(Web)客户端.Firebase的一些示例:
There are many solutions for pushing data from a server to a (web) client. Some examples from Firebase:
- Firebase的实时数据库SDK使用Web套接字维护其在客户端和服务器之间的连接.
- 使用REST API访问Firebase Realtime Database时,可以使用服务器发送的事件(SSE)完成流更新.
- Cloud Firestore使用HTTP/2上的长轮询请求.这类连接有很多解决方案.
更多阅读内容:
- 是否有某种方法可以将数据从Web服务器推送到浏览器?
- 如何服务器发送更新而没有客户请求?
- HTML将数据从服务器推送到客户端更新而没有投票(没有答案,但问题包含一些相关链接)
- 如何将实时数据从nodejs服务器推送到AngularJS?
- 以及可能来自这些搜索结果
- Is there some way to PUSH data from web server to browser?
- How can a server send an update without a client request?
- HTML push data from server to client updates without polling (no answer, but the question contains some relevant links)
- How to push live data from nodejs server to AngularJS?
- and probably more from these search results
这篇关于数据库中发生更改时在前端进行实时更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文