Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Design consideration between NodeJs and signalR

I have a web service which is completely build using .net C#. Now I want to use either signalR or Node JS so that if web service has some update it can push it to client which is in html javascript.

Design Consideration:

I am running my web service on IIS.

Client in Html javascript

Number of user may be high. May be 100 or 200

There will be frequent updates for long period of time from web service.

Web service does DB call and little calculation

Server specification is not an issue.

Need stability and security in the web service

like image 792
user2692032 Avatar asked Oct 12 '13 09:10

user2692032


1 Answers

If you are already using the Microsoft stack (.NET, C#, IIS) on your back end then it would make sense to use SignalR because it will integrate nicely with your existing stack.

You already have development experience in C#, do you have experience in NodeJS too? If not then that's a big point to consider as there will be a learning period where you become accustomed to the Node way of programming javascript.

100-200 users isn't that many for either NodeJS or SignalR. SignalR uses some of the async features of .NET and so a thread won't be used by an open connection until something is ready to happen (e.g you might be waiting on DB IO). Similarly, all IO in node should be done asynchronously.

If you're using SQL server then you might find using SignalR opens up other possibilities, e.g using Entity Framework to improve productivity and get your product to market faster.

As for stability and security, those are often dependent on the way you design, write and configure your application rather than the technology stack itself.

Edit: A couple of resources for getting started in the respective technologies that I've found helpful in the past:

  • SignalR
  • NodeJS
like image 79
Neil Mountford Avatar answered Oct 08 '22 12:10

Neil Mountford