Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SignalR.Owin vs. SignalR.SelfHost

I want to use SignalR selfhosted with Owin.

What are the differences between these two packages:

Microsoft ASP.NET SignalR OWIN

and

Microsoft ASP.NET SignalR Self Host

When to use one or other?

like image 630
CPA Avatar asked Jan 29 '16 17:01

CPA


People also ask

What is OWIN SignalR?

OWIN is the base of the SignalR library. You also know that OWIN is used to do a decoupled architecture between the web server and web application, from this great feature OWIN is the ideal feature to self-host a SignalR application. The following are reasons to not host in IIS: The availability of IIS.

Is SignalR obsolete?

SignalR is deprecated. May I know the latest package for the same. - Microsoft Q&A.

Does SignalR require WebSockets?

ASP.NET Core SignalR is a library that simplifies adding real-time web functionality to apps. It uses WebSockets whenever possible. For most applications, we recommend SignalR rather than raw WebSockets.

What is OWIN middleware?

OWIN allows web apps to be decoupled from web servers. It defines a standard way for middleware to be used in a pipeline to handle requests and associated responses. ASP.NET Core applications and middleware can interoperate with OWIN-based applications, servers, and middleware.


2 Answers

Microsoft ASP.NET SignalR Self Host still uses OWIN to startup. The only difference is that the Self Hosted SignalR server doesn't need to be nested in an ASP.NET web application hosted in IIS. It can be a simple console application.

See MSDN for more info:

Reasons for not hosting in IIS include:

  • Environments where IIS is not available or desirable, such as an existing server farm without IIS.
  • The performance overhead of IIS needs to be avoided.
  • SignalR functionality is to be added to an exising application that runs in a Windows Service, Azure worker role, or other process.
like image 195
JF Beaulieu Avatar answered Oct 13 '22 00:10

JF Beaulieu


I think the main difference is, that Microsoft ASP.NET SignalR OWIN is an older package, because it depends on Microsoft.AspNet.SignalR.Core (>= 1.2.2). And Microsoft ASP.NET SignalR Self Host depends on Microsoft.AspNet.SignalR.Core (>= 2.2.0). That is why I will use the Microsoft ASP.NET SignalR Self Host package.

like image 31
CPA Avatar answered Oct 12 '22 22:10

CPA