SignalR logo

SignalR

A new library for ASP.NET developers that makes developing real-time web functionality easy.
493
1.2K
+ 1
146

What is SignalR?

SignalR allows bi-directional communication between server and client. Servers can now push content to connected clients instantly as it becomes available. SignalR supports Web Sockets, and falls back to other compatible techniques for older browsers. SignalR includes APIs for connection management (for instance, connect and disconnect events), grouping connections, and authorization.
SignalR is a tool in the Realtime Backend / API category of a tech stack.
SignalR is an open source tool with 9.2K GitHub stars and 2.3K GitHub forks. Here’s a link to SignalR's open source repository on GitHub

Who uses SignalR?

Companies
74 companies reportedly use SignalR in their tech stacks, including ViaVarejo, accuRx, and XYZ Technology.

Developers
382 developers on StackShare have stated that they use SignalR.
Pros of SignalR
32
Supports .NET server
25
Real-time
18
Free
16
Fallback to SSE, forever frame, long polling
15
WebSockets
10
Simple
9
Open source
8
Ease of use
8
JSON
5
Cool
0
Azure
Decisions about SignalR

Here are some stack decisions, common use cases and reviews by companies and developers who chose SignalR in their tech stack.

Needs advice
on
Microsoft TeamsMicrosoft TeamsSignalRSignalR
and
SlackSlack

Hi everyone! I am trying to implement a chat module in my product but it is not stable. My backend is in ASP.NET Core with EF Core, and my frontend is in Angular. Since I am already using dotnet, I used SignalR as a socket connection provider. At the moment, it works when the user logs in, the chats are loaded and the user is notified if there is any unread message just like any other app does by displaying a badge and number of unread chats. When the user navigates to chat, it loads the messages of chat. To avoid user waiting for messages I have stored the messages locally in a state management store and when the user switches the chat, it first loads messages from the store and then sends a request to server if there is any other message that is not on local.

The problem starts with multiple connections when single account is connected from multiple clients/browsers. From backend, I check if user is connected to SignalR socket then I send the message to all connections of user it does not work properly, this part is highly unstable. secondly, How can I improve the response of message loading? I only load 25 messages at the start.

Is there any article describing how Slack, Google Chat or MS Teams is handling the browser chat? it would be of great help.

Thanks

See more

Which option do you prefer to go with (considering scalability, and a limited budget):

Technologies in use: Angular / .NET Core 6

What do we want to achieve?

We want to create simple near-time web notifications, those notifications can be categorized into 2 sections:

  • User notification: which represents user activities and engagements.

  • System notification e.g release notes and maintenance time. The notification object is too simple just a title, body, userId, notificationStatus, and readAt. notification status is an enum with 3 values: unread, menuOpened, Read.

Options:

  1. use Firebase Realtime Database for user notifications and Microsoft SQL Server for system notifications (maybe using long poling or so to frequently call the getSystemNotification API ).

  2. use SignalR to push new notifications along with the SqlServer database and store both user and system into one table (as they almost have the same attributes)

See more
Needs advice
on
FirebaseFirebasePusherPusher
and
SignalRSignalR

I'm working on a project where I need to both send real-time updates for specific data sets, along with providing notifications to the users after long-running processes have been completed (SSE).

The project is using .NET Framework, AngularJS, & MSSQL. I understand that SignalR is nice as a polyfill for .NET and you can scale with a backplane, but I was wondering if there was a more efficient/effective technology for this?

See more
Needs advice
on
gRPCgRPC
and
SignalRSignalR

We need to interact from several different Web applications (remote) to a client-side application (.exe in .NET Framework, Windows.Console under our controlled environment). From the web applications, we need to send and receive data and invoke methods to client-side .exe on javascript events like users onclick. SignalR is one of the .Net alternatives to do that, but it adds overhead for what we need. Is it better to add SignalR at both client-side application and remote web application, or use gRPC as it sounds lightest and is multilingual?

SignalR or gRPC are always sending and receiving data on the client-side (from browser to .exe and back to browser). And web application is used for graphical visualization of data to the user. There is no need for local .exe to send or interact with remote web API. Which architecture or framework do you suggest to use in this case?

See more

SignalR Alternatives & Comparisons

What are some alternatives to SignalR?
Firebase
Firebase is a cloud service designed to power real-time, collaborative applications. Simply add the Firebase library to your application to gain access to a shared data structure; any changes you make to that data are automatically synchronized with the Firebase cloud and with other clients within milliseconds.
Pusher
Pusher is the category leader in delightful APIs for app developers building communication and collaboration features.
RabbitMQ
RabbitMQ gives your applications a common platform to send and receive messages, and your messages a safe place to live until received.
WebRTC
It is a free, open project that enables web browsers with Real-Time Communications (RTC) capabilities via simple JavaScript APIs. The WebRTC components have been optimized to best serve this purpose.
MQTT
It was designed as an extremely lightweight publish/subscribe messaging transport. It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium.
See all alternatives

SignalR's Followers
1195 developers follow SignalR to keep up with related blogs and decisions.