5 ms·
It seems Socket.io has not had any contenders yet..
by swah 15y ago
It seems Socket.io has not had any contenders yet..
- yesbabyyes 15y agoSocket.io is a great library. When it comes to a contender, I see Server-side Events [1] as a contender to WebSockets. I feel it's a simpler architecture which fits HTTP/REST better than WebSockets in the general case. I built a couple of small experiments/examples using CoffeeScript and Redis [2]; the middleware.coffee in particular is designed to be used together with REST, where if you send "Accept: text/event-stream" you will get updates to the resource(s) on that URL. 1: http://dev.w3.org/html5/eventsource/ http://dev.w3.org/html5/eventsource/ 2: https://gist.github.com/1560654 https://gist.github.com/1560654
- josephg 15y agoUnfortunately, eventsource isn't supported by any current version of IE. It'll be awhile before ES can replace your AJAX/websocket libraries. http://caniuse.com/#search=eventsource http://caniuse.com/#search=eventsource
- yesbabyyes 15y agoOn the plus side, it's supported by Opera Mini and iOS. For IE and others (Android, I'm looking at you!), I have yet to try it and so can't vouch for it, but there exists a polyfill: https://github.com/Yaffle/EventSource https://github.com/Yaffle/EventSource
- josephg 15y agoThere are a few, but none of them are widely known about. Socket.io's problems only become visible once you've been working with it for awhile. The three alternatives I know about are SockJS: http://sockjs.org http://sockjs.org Faye - which implements the Bayeux pubsub protocol: http://faye.jcoglan.com/ http://faye.jcoglan.com/ And node-browserchannel (mine) which implements google's browserchannel protocol: https://github.com/josephg/node-browserchannel https://github.com/josephg/node-browserchannel (BrowserChannel works all the way down to IE5.5!)