Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

socket.io vs. SignalR [closed]

I am developing a ASP.NET MVC app deployed on Azure, and looking for a library providing asynchronous transport mechanism/fallback.

After my own research, I've concluded that there are two well-known candidates - Socket.io and SignalR.

My question is simple) What's the pros and cons of them? It there any good reason to use one over the other?

thanks :)

like image 319
soleiljy Avatar asked Oct 01 '12 20:10

soleiljy


People also ask

Should I use WebSockets or SignalR?

For most applications, we recommend SignalR over raw WebSockets. SignalR provides transport fallback for environments where WebSockets isn't available. It also provides a basic remote procedure call app model. And in most scenarios, SignalR has no significant performance disadvantage compared to using raw WebSockets.

What is the alternative of SignalR?

There are many alternatives for signalR that are used, like Firebase, pusher, webRTC, RabbitMQ, gRPC, and MQTT.

Is SignalR a Socket?

SignalR is like Socket.IO in that it supports transport negotiation/fallback. It is a framework and not a server, so you need to host it on a server of some sort. We have hosts for ASP.NET, OWIN (e.g. Kayak) and self-host, so you can run it in your own process easily, e.g. a Windows service.

Which is better Socket.IO or WebSockets?

Socket.IO is way more than just a layer above WebSockets, it has different semantics (marks messages with name), and does failovers to different protocols, as well has heartbeating mechanism. More to that attaches ID's to clients on server side, and more. So it is not just a wrapper, it is full-featured library.


2 Answers

I'd have to say that SignalR is definitely the best approach for your application. With the current build our laptops serving as servers are pushing around 350k messages/s. With the next release it will be even higher (several multiples higher judging by current tests).

Check out the main site: http://signalr.net/

The GitHub: https://github.com/SignalR/SignalR

JabbR for questions: http://jabbr.net/#/rooms/signalr

like image 79
N. Taylor Mullen Avatar answered Sep 30 '22 12:09

N. Taylor Mullen


I've never used SignalR and according to what google tells me it is a replacement solution for .Net apps.

So I guess you should give it a try. Socket.IO is awesome, I love it but I'm a noder. According to their doc there is no .net/c# bindings. Maybe their doc is not up to date.

like image 44
3on Avatar answered Sep 30 '22 12:09

3on