SignalR is a library used in ASP.NET to deliver real-time web functionality to applications. Real-time web functionality is the ability to have server-side code push content to the connected clients directly in the present time.

This functionality uses the concept of RPC (Remote Procedure Calls) where an API is provided to allow JavaScript functions to be directly called from the server-side .NET code.

This is different to the traditional HTTP Request and Response model used by the vast majority of applications running on the web today.

When communicating between server and connecting clients SignalR will automatically select the best available transport system available and will fall back to lesser technologies without the need to alter the original source code.

Below is the list of the technologies it can utilise in descending order of efficiency and sustainability.

  1. WebSockets – Establishes a true persistent two-way connection between client and server. Supported in the latest versions of all the popular web browsers.
  2. Server Sent Events – Doesn’t work with Internet Express
  3. Forever Frame – I.E only uses standard HTTP requests.
  4. Ajax Long Polling – doesn’t create persistent connections

A typical SignalR app will be used in a chat room to broadcast messages to all connected clients or to specific clients only.

Other apps can also be created when results are required straight away such as online quizzes and surveys. Also, real time gaming can be supported due to SignalR supporting high frequency server-side updates.

The latest version of SignalR works in harmony with the latest version of the ASP.NET core framework (currently v2.2) Like ASP.NET it is 100% open-source.

SignalR apps can be hosted using Microsoft Azure to provide a fully managed platform solution. Azure can provide all the hosting, scalability, and load balancing requirements for the solution.

Leave a Reply