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)
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 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).
Is it possible to use socket.io without any node. js dependencies? The short answer is yes. You will however have Flash dependency.
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.
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:
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 :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With