[英]Node.JS Looking for an alternative to socket.IO
I've been testing Node.JS and Socket.IO for a couple of days. 我已经测试了几天Node.JS和Socket.IO。 I'm interested in a real-time application that's why I'm testing Socket.IO, problem is I found many problems on several browsers.
我对实时应用感兴趣,这就是我测试Socket.IO的原因,问题是我在几个浏览器上发现了很多问题。 Chrome always works but IE and Firefox only some times.
Chrome总是有效,但IE和Firefox只有一段时间。
My question is, is there a way to push information from the server to the client without sockets (socket.io)? 我的问题是,有没有办法在没有套接字(socket.io)的情况下将信息从服务器推送到客户端? I don't want to set an interval in the client and check if something changes on the server side every "n" seconds.
我不想在客户端设置一个间隔,并检查服务器端是否每隔“n”秒发生一些变化。
Faye is a good alternative to Socket.IO for Node.js push applications. 对于Node.js推送应用程序, Faye是Socket.IO的一个很好的替代品。
From the Faye website: 来自Faye网站:
Faye is an easy-to-use publish-subscribe messaging system based on the Bayeux protocol.
Faye是一个易于使用的基于Bayeux协议的发布 - 订阅消息系统。 It provides message servers for Node.js and Rack, and clients for use in Node and Ruby programs and in the browser.
它为Node.js和Rack提供消息服务器,并在Node和Ruby程序以及浏览器中使用客户端。
You can try long-polling. 你可以尝试长轮询。 It's relatively simple and it'll work in almost any browser.
它相对简单,几乎可以在任何浏览器中使用。 Check this out:
看一下这个:
http://jsguy.com/?p=103 http://jsguy.com/?p=103
Hope this helps 希望这可以帮助
Socket.IO has had some bugs recently, but they're being actively worked on, so I encourage you to check back later (it may even already be working better now, as there are commits almost every day). Socket.IO最近有一些bug,但是他们正在积极开展工作,所以我建议你稍后再回来看看(现在可能已经有了更好的工作,因为几乎每天都有提交)。 This is the issue you should be watching: http://github.com/LearnBoost/Socket.IO-node/issues#issue/63
这是你应该看的问题: http : //github.com/LearnBoost/Socket.IO-node/issues#issue/63
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.