SignalR is useful for server-pushed updates such as order status, notifications, and dashboards. Treat a connection as transient: reconnects occur, messages can be missed, and a client may have several connections. Example: public Task JoinOutlet(Guid outletId) { AuthorizeOutlet(outletId); return Groups.AddToGroupAsync(Context.ConnectionId, $"outlet:{outletId}"); } await hub.Clients.Group($"outlet:{outletId}").SendAsync("OrderChanged", dto, ct); Authorize group membership from server-side claims, never from an untrusted ID alone. Send small events and let clients reload authoritative state after reconnect. For multiple instances use a supported backplane/service, and apply rate limits, versioned payloads, correlation, and disconnect cleanup.
Backbencher Developer · · 0 likes