简体   繁体   中英

Node.JS Looking for an alternative to socket.IO

I've been testing Node.JS and Socket.IO for a couple of days. 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. Chrome always works but IE and Firefox only some times.

My question is, is there a way to push information from the server to the client without sockets (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.

Faye is a good alternative to Socket.IO for Node.js push applications.

From the Faye website:

Faye is an easy-to-use publish-subscribe messaging system based on the Bayeux protocol. It provides message servers for Node.js and Rack, and clients for use in Node and Ruby programs and in the browser.

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

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). This is the issue you should be watching: http://github.com/LearnBoost/Socket.IO-node/issues#issue/63

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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