Trust is earned, not given

A different perspective

2023-12-09 · Projects

Realtime pages with Blazor and SignalR in .NET 10

BlazorSignalR is the minimal, textbook version of realtime .NET web: a .NET 10 Blazor Web App (interactive server render mode) plus an explicit SignalR hub, showing the two ways content reaches a page live — server-generated push and user-generated broadcast.

Run it in one command

dotnet run --project BlazorSignalR

Open the Realtime page: every three seconds a hosted service pushes a telemetry reading to every connected browser. Open a second tab and type — every tab receives it. Those are the two directions, and everything else about realtime is elaboration.

The three pieces, and where each lives

Beginner notes

Blazor Server already feels "live" (the UI diffs arrive over its own circuit), so why SignalR? Because the circuit is per-user: the moment other users or background processes must update your page, you need a broadcast mechanism, and that is exactly SignalR. For the large, feature-complete version of the same ideas, see the Messenger-style chat article.

Repository: github.com/bobhuang1/BlazorSignalR