Rails 3:实时服务器推送?

发布于 2024-12-04 00:44:05 字数 222 浏览 1 评论 0原文

我正在尝试编写一个 Rails 3 应用程序,其中服务器可以将数据实时推送到多个客户端。

我听说过 Juggernaut,但我也听说它不能与 Rails 3 一起使用。我尝试过 APE(AJAX 推送引擎),但我不太幸运。

我对 Rails 很陌生。我找不到很多涉及实时推送和 Rails 3 的指南。我一直在寻找一个免费、简单(如果可能的话)的解决方案。如果有人能指出我正确的方向,我将不胜感激。

I'm trying to write a Rails 3 application in which a server can push data to multiple clients in real time.

I've heard of Juggernaut, but I've also heard that it does not work with Rails 3. I tried APE (AJAX Push Engine), but I'm not having much luck with it.

I'm very new to Rails. I can't find many guides that involve real-time push, and Rails 3. I was looking for a free, easy (if possible) solution to this. If anyone could point me in the right direction, I'd greatly appreciate it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

半透明的墙 2024-12-11 00:44:05

看看 Faye:http://faye.jcoglan.com/ - 我听到了一些关于它的好消息。

如果您正在寻找托管解决方案,我过去曾使用过 Pusher http://pusher.com/,并且很喜欢它。我在大约 30 分钟内将一个使用 ajax 轮询的网站转换为推送器。

Check out Faye: http://faye.jcoglan.com/ - I hear really good things about it.

if you're looking for a hosted solution, i've used Pusher http://pusher.com/ in the past, and loved it. i converted a site that used ajax polling over to pusher in about 30 minutes.

尘世孤行 2024-12-11 00:44:05

您可以尝试 juggernaut 来做您想做的事情。

github 存储库:https://github.com/maccman/juggernaut
Juggernaut 的应用示例: https://github.com/maccman/holla

享受吧:)

You can try juggernaut to do what you want.

The github repository : https://github.com/maccman/juggernaut
Example of application with juggernaut : https://github.com/maccman/holla

Enjoy :)

她如夕阳 2024-12-11 00:44:05

您是否研究过 http://socket.io ?如果我没记错的话,它为 Juggernaut 背后的推送功能提供动力。

这里似乎有一个 Rails 库: https://github.com/markjeee/Socket.IO -rack —— 它说 2.3+,我认为这意味着 3 就可以了(尽管我不是 Ruby 爱好者,所以我真的不知道)。

Have you looked into http://socket.io ? It powers the push functions behind Juggernaut, if I recall correctly.

There appears to be a library for Rails here: https://github.com/markjeee/Socket.IO-rack -- it says 2.3+, which I assume means 3 is ok (though I'm not a Ruby guy, so I wouldn't really know).

长亭外,古道边 2024-12-11 00:44:05

为了与 Pusher 建议保持一致,有 RMSN - 我使用 NowJS 编写的替代品。
https://github.com/leppert/RMSN

In keeping with the Pusher suggestion, there's RMSN - a drop in replacement I've written using NowJS.
https://github.com/leppert/RMSN

哑剧 2024-12-11 00:44:05

从 Rails 4 开始,您还可以使用 Entangled:

https://github.com/so-entangled/rails< /a>

它基本上通过网络套接字使客户端和服务器之间的所有数据保持实时同步。设置起来很容易,所以请尝试一下。

Starting with Rails 4, you could also use Entangled:

https://github.com/so-entangled/rails

It basically keeps all data between client and server in sync in real time through web sockets. It's easy to set up, so give it a try.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文