简体   繁体   English

Rails 3:从Node.js / MongoDB向用户显示实时数据

[英]Rails 3: Show Real-Time Data to User from Node.js/MongoDB

I have a Rails web app that shows data to user, however, that data is not being shown in real-time even though a node.js server is adding the data in real-time to a cloud database that the Rails app has access. 我有一个向用户显示数据的Rails Web应用程序,但是,即使node.js服务器将数据实时地实时添加到Rails应用程序可以访问的云数据库中,也无法实时显示数据。

How can I show the data in Rails, from the database, as soon as it arrives? 如何在到达数据库后立即从数据库中显示Rails中的数据?

Thanks 谢谢

How can I show the data in Rails, from the database, as soon as it arrives? 如何在到达数据库后立即从数据库中显示Rails中的数据?

How about doing it the other way: as soon as your data arrives and are stored in DB, you can send them to clients through socket.io established connection for example. 以另一种方式进行操作:一旦数据到达并存储在DB中,您就可以通过例如socket.io建立的连接将其发送给客户端。

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

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