ASP.NET Core SignalR provides two-way, real-time communication between a server and connected clients. A server can push an update as it happens instead of waiting for a client to poll. Hubs provide a higher-level way for each side to call methods on the other. section 4.1
SignalR normally uses WebSockets. If that transport is unavailable, it can fall back to server-sent events or long polling. For applications spread across servers, backplanes such as Redis, Azure SignalR Service, and SQL Server can deliver updates to clients regardless of which server holds their connection. section 4.1
builder.Services.AddSignalR();
Register SignalR’s services in the API project’s Program.cs before configuring the hub endpoint. section 4.3.2
app.MapHub<LocationHub>("/locationHub");
Map the location hub to an HTTP path before app.Run(); clients use that path to reach the hub. section 4.3.2
Live order location
A user interface stays connected to the backend and receives updated locations for a marker on an OpenLayers map. In Blazor, interactive rendering and JavaScript interop support the map updates; UI updates from Blazor must wait until the Razor component has rendered. section 4.5
The same real-time channel can support a custom chat interface that streams an LLM answer as it arrives. section 5.4
