4

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.

oscarm
  • 2,630
  • 6
  • 41
  • 74
  • Socket.io !== websockets, there are other websocket libraries for node, like websocket-node https://github.com/Worlize/WebSocket-Node/ – UpTheCreek Jul 30 '12 at 09:54

3 Answers3

5

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.

elasticrat
  • 7,060
  • 5
  • 36
  • 36
3

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

mattbasta
  • 13,492
  • 9
  • 47
  • 68
2

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

ehsanul
  • 7,737
  • 7
  • 33
  • 43