This course consists of the following chapters.

Introduction to SignalR

This chapter provides an overview of SignalR and outlines the structure for the remainder of the course.

Setting up your project

This chapter will show us how to set up our environment, create an ASP.NET Core application, and add a SignalR hub to it. We'll cover how server-side components of SignalR work.

The chapter consists of the following topics:

  • Setting up your environment.
  • Setting up SignalR hub.
  • Making SignalR hub strongly typed.

In-browser SignalR clients

In this chapter, we’ll learn to set up in-browser SignalR clients. This is perhaps the most commonly used type of SignalR client. For example, this is how we can build a real-time chat application.

The chapter consists of the following topics:

  • Setting up JavaScript client.
  • Setting up Blazor WebAssembly client.

External SignalR clients

In this chapter, we’ll learn to set up external self-contained applications as SignalR clients. For example, such a client might be an IoT application. We’ll cover all remaining types of clients that are officially supported and documented. On top of this, we’ll learn to connect a raw WebSocket to the SignalR server, so we can write a client for it in absolutely any language of our choice.

The chapter consists of the following topics:

  • Setting up .NET client.
  • Setting up Java client.
  • Setting up a raw WebSocket client.

Sending messages to individual clients or groups of clients

This chapter will walk us through the process of grouping SignalR clients. We’ll also look at how clients can be called selectively by the server. This is useful because we won’t always have to notify all the connected clients when some event occurs.

The chapter consists of the following topics:

  • Broadcasting messages to all clients.
  • Sending messages to specific clients.
  • Working with client groups.

Streaming in SignalR

Not only can SignalR make single calls, it has the ability to stream data from the server to the client and vice versa. In this chapter, we’ll learn how to enable it.

The chapter consists of the following topics:

  • What is streaming used for?
  • Client streaming in SignalR.
  • Server streaming in SignalR.

Advanced SignalR configuration

In this chapter, we’ll learn to apply an advanced configuration to SignalR, both client-side and server-side. We’ll also cover an additional messaging protocol that can be used with SignalR: MessagePack. This protocol will allow us to increase the performance of our communication substantially.

The chapter consists of the following topics:

  • Configuring SignalR server.
  • Configuring SignalR client.
  • Pros and cons of MessagePack protocol.

Securing your SignalR applications

Security is an important part of any software application. We don’t want unauthorized users to gain access to sensitive information or functionality. And SignalR is no exception. This chapter will teach us how to secure the SignalR application.

The chapter consists of the following topics:

  • What is CORS and why it’s important?
  • Setting up single sign-on provider.
  • Applying authentication in SignalR.
  • Applying authorization in SignalR.

Scaling out SignalR application

If our application is intended to work with a large number of clients, we’ll eventually need to scale it out. This chapter will teach us how to scale out our SignalR hub.

The chapter consists of the following topics:

  • Setting up Redis cache.
  • Running multiple hub instances via Redis backplane.
  • Using HubContext to send messages from outside SignalR Hub

Introducing Azure SignalR Service

We can scale out a SignalR server on-premises, but we can also outsource the task to Azure cloud. This chapter will show us how to scale out our SignalR server by using Azure SignalR Service.

The chapter consists of the following topics:

  • Setting up Azure SignalR Service.
  • Adding Azure SignalR Service dependencies to your application.
  • Overview of Azure SignalR Service REST API.