Module 10 of 12

Real-Time & Background Work

Lessons

About This Module

Not everything an application does fits inside a single request and response. Sometimes the server needs to push updates to clients the moment something happens, and sometimes it needs to run work in the background — sending emails, processing queues, or refreshing data on a schedule — without making the user wait.

This module starts with SignalR, ASP.NET Core's library for real-time communication, covering project setup, hubs, and how to target specific clients and groups. It then moves to background work: the difference between IHostedService and BackgroundService, and how to build a background task queue with Channels so requests can hand off slow work safely.

Watch the lessons in order, then continue on to Testing ASP.NET Core Apps.

Lessons

4 videos
01

Implementing SignalR in ASP.NET Core: Project Setup & SignalR Basics

Introduces SignalR and shows how it enables real-time communication in ASP.NET Core applications, covering the core concepts behind it and project setup.

02

SignalR Clients, Groups & Rooms in .NET 9

Moves from broadcasting to everyone to targeting specific clients, groups, and rooms with SignalR in .NET 9. This is Part 2 of a playlist, so watch the first lesson before this one.

03

IHostedService vs. BackgroundService

Explains the two ways to implement background tasks in .NET: implementing IHostedService directly, or inheriting from the BackgroundService base class.

04

Smarter Background Task Queue with Channels

A deep dive into background task processing in .NET using the Channels library to build a more efficient task queue in a Web API.