Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
237 views
in Technique[技术] by (71.8m points)

database - Application that receives data in real time without refresh

I am developing a desktop program, a website and an application and they both communicate through the same database. I started researching about making these apps real-time, that I don't need to update to receive a new registration or a change to something. I discovered websockets and socket.io, saw some examples and read a lot about it, but then I saw that there are some databases that already do this and one of the most famous is firebase. What I would like to ask here is, using firebase can I make an application in real time? An application that when registering data to the database, all other connected applications receive this data in real time?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

In google firebase, you can create listeners on the client-side to respond to any changes in the backend. Check out https://firebase.google.com/docs/firestore/query-data/listen.

This is great if you need to store data, but if you are purely looking to send information between clients and there is no need for any persistence, I would recommend using WebSockets.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...