Introduction
Dear reader, as we know nowadays, real-time data communication is one of the major parts of software development.
As we know, Microsoft provided one of the great technology that is SignlR. It is one of the most important topics for real-time data communication. Sometimes we are required to get up-to-date data without doing any action by the end user, in this case, signalR helps us.
In this article, I will try to explain an overview of SignalR in .NET core.
Based on that I have categories in the following ways:
- Overview
- Architecture
- Goals
- Implementation
- Dependencies
- References
Overview
SignalR is a data notification service and it is an open-source provided by Microsoft that help us for real-time web functionality to apps.
Real-time web functionality means that it sends server-side messages to push client-side without any user action. It also allows us to send data from the client to server when they are connected to each other.
This kind of communication is managed through protocols, There are three kinds of protocols that signalR uses:
In these protocols, WebSocket is one of the most and default protocols.
SignalR uses in many application scenario, in this case, this is best for such kind of applications.
- Chat applications
- Project management tools
- Online gaming
- Automatic updating of applications
- Notifications and alerts
There are the following features that we will cover in this section:
- It handles connection management automatically.
- Sends messages to all connected clients simultaneously.
- Sends messages to specific clients or groups of clients.
- Scales to handle increasing traffic using a load balancer.
Transports
SignalR supports many ways of handling real-time data communications:
- WebSockets
- Server-Sent Events
- Long Polling
- It automatically chooses the best transport method. The default is a websocket that has the capabilities of the server and client for mutual.
Hubs
SignalR uses hubs class to communicate between clients and servers.
A hub is a high-level pipeline class that allows a client and server to call methods to each other. SignalR handles the data communication across multiple boundaries automatically, it allows the clients to call methods which is available on the server and vice versa.
The Hub class contains Context property and many more, which further provides other information about the connection, such as:
- ConnectionAborted
- ConnectionId
- Features
- Items
- User
- UserIdentifier
Architecture
This is the basic architecture which explains how data will pass from server to clients and from clients to Server
As we know, in SignalR there are client and server concepts. It is a bi-directional data communication when they are connected to each other.
- The client sends data to Server
- The server sends data to the Client
Goals
When we are going to implement SignalR, then there are a set of goals which we need to achieve in this technology that are as follows:
- Connection Management(Handshake)
- Connect and Retry
- Send/Receive message
- Scales to handle increasing traffic.
- Authentication
Based on our goals I have divided the flow into 2 sections and implemented it according to that:
- Client Management
- Server Management

aftab alamPosted Aug 22, 2023, 5:26 PM
Hello Hamid Sir
Saravanakumar SekaranPosted Jan 16, 2021, 6:25 AM
Very amazing article !!!
Arkadeep DePosted Jan 9, 2021, 7:14 PM
Nice.. informative