简体   繁体   English

Rails - 同步 - Faye,Juggernaut,Cool.io,普通老式事件机器

[英]Rails - syncing - Faye, Juggernaut, Cool.io, plain old eventmachine

I have a need for syncing and have choice overload. 我需要同步并选择重载。 It seems like the options available include: Faye, Juggernaut, Cool.io, plain old eventmachine 似乎可用的选项包括:Faye,Juggernaut,Cool.io,普通的老式事件机

Any suggestions? 有什么建议? What are the most popular, especially in the RoR community? 什么是最受欢迎的,特别是在RoR社区?

Thanks for any explanation around your suggestion. 感谢您对您的建议的任何解释。

I just implemented Juggernaut in one of my apps and I think it's awesome. 我刚刚在我的一个应用程序中实现了Juggernaut,我觉得它很棒。 It uses Redis for its pub/sub features and Socket.IO to maximise browser/mobile support. 它使用Redis的pub / sub功能和Socket.IO来最大化浏览器/移动支持。

Here's a discussion comparing it with Faye. 以下是与Faye进行比较的讨论。 I don't believe Faye uses Socket.IO which is one of the reasons I chose Juggernaut. 我不相信Faye使用Socket.IO,这是我选择Juggernaut的原因之一。 I also liked the simplicity of Juggernaut as it matched my particular use case. 我也喜欢Juggernaut的简洁性,因为它符合我的特定用例。

Juggernaut uses Node.js for its server making it easily scalable and provides a Ruby gem that makes publishing messages onto Redis a piece of cake. Juggernaut将Node.js用于其服务器,使其易于扩展,并提供了一个Ruby gem,使得在Redis上发布消息变得轻而易举。

Here's a quick post on setting it up on Ubuntu 10.04. 这是在Ubuntu 10.04上设置它的快速帖子

You could also look at Pusher which is a service that does it all for you. 您还可以查看Pusher ,这是一项为您完成所有工作的服务。

I've used http://socket.io/ in a pilot project for continuously updating web clients (like in chat application). 我在一个试点项目中使用了http://socket.io/来不断更新Web客户端(比如在聊天应用程序中)。 The ruby server implementation is here: https://github.com/markjeee/Socket.IO-rack . ruby服务器实现在这里: https//github.com/markjeee/Socket.IO-rack It is somewhat 'raw' but works OK. 它有点“原始”但工作正常。 It is based on Thin, Rack and EventMachine and requires redis for operation. 它基于Thin,Rack和EventMachine,需要redis才能运行。

The big advantage is the number of available protocols so even if you have an old browser it should just work. 最大的优点是可用协议的数量,所以即使你有一个旧的浏览器它应该工作。 I haven't done any benchmarks but based on ingredients it should be fast enough. 我没有做任何基准测试,但基于成分,它应该足够快。

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

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