Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Socket.io alternative [closed]

I apologise in advance that this might get flagged and closed for being an opinion-based thread but this is purely a fact-finding mission. I'm very new to the world of web sockets and the only reputable library I'm aware of is socket.io and the site is currently down so I'm taking the opportunity to discover another library. I'm building a MEAN app and I'd like the ability to have communication between clients and a central server, all in real-time which is where socket.io would come into play but are there any other alternatives I should know about?

(My server is written with Express 4)

like image 511
leaksterrr Avatar asked Jun 01 '14 09:06

leaksterrr


People also ask

Is Socket.IO better than WebSocket?

As said before, Socket.IO can fall back to technologies other than WebSockets when the client doesn't support it. If (for some reason) a WebSocket connection drops, it will not automatically reconnect… but guess what? Socket.IO handles that for you! Socket.IO APIs are built to be easier to work with.

What is the difference between Socket.IO and WebRTC?

What is the difference between WebRTC and WebSockets? While both are part of the HTML5 specification, WebSockets are meant to enable bidirectional communication between a browser and a web server and WebRTC is meant to offer real time communication between browsers (predominantly voice and video communications).

Can I use Socket.IO without node JS?

Is it possible to use socket.io without any node. js dependencies? The short answer is yes. You will however have Flash dependency.

Is Socket.IO based on WebRTC?

Or check out the repository directly! Socket.IO P2P provides an easy and reliable way to setup a WebRTC connection between peers and communicate using the socket. io-protocol. Socket.IO is used to transport signaling data and as a fallback for clients where the WebRTC PeerConnection is not supported.


1 Answers

A few days ago Socket.io 1.0 was released (previous version was 0.9). The official website http://socket.io seems to being updated too (as well as Socket.io's Github wiki page). I visited a new version of the website just yesterday and it was 200 OK.

As for your question - well, this is really opinion-based, and in my opinion Socket.io provides all you need to build cross-browser real-time applications, so I would recommend using it. Socket.io is good because:

  • It has a variety of transports between client and server: WebSockets, XHR long polling, JSONP, Flashsockets, etc. (Important note: since version 1.0 Socket.io is able to change transport on a fly without messages loss)
  • It has rooms support
  • It has auto-reconnect support
  • It has simple and convenient API
  • It has simple integration with Express and Koa
  • It has large community
  • It is fully cross-browser

Though if you want to know more about alternatives, take a look at SockJS. This is a framework similar to Socket.io. But since I have never used it I can't tell how good it is.

Good luck and sorry for my English :)

like image 91
Oleg Avatar answered Oct 13 '22 08:10

Oleg