Devizur
All insightsEngineering

Real-Time POS and Operations with ASP.NET Core SignalR

How to build responsive station screens, kitchen displays and admin dashboards while preserving reliable recovery when connections fail.

Soud Al Raihan23 July 20263 min read
Order ChangeDatabase CommitSignalRStation Screens

History and context

Polling era
Browsers repeatedly asked servers whether anything changed.
WebSocket era
Persistent connections made low-latency server push widely practical.
SignalR
SignalR abstracts real-time connection management for ASP.NET Core applications and can use appropriate transports.
Production systems
Reliable real-time UX combines push notifications with authoritative state reload, authentication, grouping and scale planning.

Where real-time actually matters

POS itself can often tolerate request-response APIs. Operational screens such as kitchen displays, preparation stations, dispatch boards and order-monitoring dashboards benefit from low-latency server push because state changes are produced elsewhere.

Reference real-time architecture

POS / AdminASP.NET Core APIPostgreSQLSignalR HubKitchen / Station Screens
The database remains authoritative; SignalR distributes change notifications.

Use groups to target operational audiences

C#
public Task JoinStation(int shopId, int stationId)
{
    var group = $"shop:{shopId}:station:{stationId}";

    return Groups.AddToGroupAsync(
        Context.ConnectionId,
        group);
}

Publish after durable state changes

C#
await hubContext.Clients
    .Group($"shop:{shopId}:station:{stationId}")
    .SendAsync(
        "taskUpdated",
        stationTask,
        cancellationToken);

React client with reconnect

TypeScript
const connection = new HubConnectionBuilder()
  .withUrl("/hubs/stations")
  .withAutomaticReconnect()
  .build();

connection.on("taskUpdated", task => {
  upsertTask(task);
});

connection.onreconnected(async () => {
  await reloadStationState();
});

Why reconnect must reload state

A client may miss events during a network outage. Replaying every event is possible, but many operational UIs can use a simpler pattern: reconnect, then refetch the current authoritative state. That prevents the UI from assuming that the event stream itself is durable history.

Authenticate and authorise hub access

Hub connections must respect the same identity and permission model as ordinary APIs. Group names should not be treated as access control; server-side authorisation decides whether a connection is allowed to join a shop or station.

Scaling considerations

High-connection-count real-time systems require deliberate connection and hosting architecture. Microsoft's current ASP.NET Core guidance includes specific production hosting and scaling considerations for SignalR applications.

Business value and practical considerations

Pros

  • Low-latency operational UX
  • Natural .NET integration
  • Group targeting
  • Automatic reconnect support on clients

Considerations

  • Connection lifecycle complexity
  • Missed-event recovery required
  • Scale differs from normal HTTP
  • Security applies to persistent connections too
SA
Soud Al RaihanReal-time systems · Devizur

References

Primary documentation used for terminology and current platform guidance: