Skip to main content

Production Review (capstone)

This example is the whole of TicketOps Live in one page — the status strip, the background import monitor, the live ticket board fed by the global TicketHub, the cadence controls, the session diagnostics — plus what this module adds: the real-time health panel, the effective configuration and the production checklist.

Run it

cd "LearnWisej-Samples/Real-Time Server Push Course/Module 7/TicketOpsLive"
dotnet run -f net10.0 --urls http://localhost:5307

Then open http://localhost:5307, and Session → Open second window for a second tab. (Visual Studio: open TicketOpsLive.slnx, press F5.) The demo script, step by step: docs/DemoScript.md.

The capstone, feature by feature

Required feature (lab)FromWhere in this app
Live status stripM01statusPanel + HeartbeatLoop in MainPage.cs; ▶ Start heartbeat / ■ Stop in the strip
Session diagnosticsM02Session tab: diagnosticsGroupBox, lifecycleListBox, liveSessionsLabel, Services/SessionRegistry.cs
Background import monitorM03Import monitor tab: Start Import / Cancel Import / Fail at 87, RunImport, Services/ImportJob.cs
Cadence and polling controlsM04Cadence tab: liveModeCheckBox, cadenceComboBox, refreshTimer_Tick, Services/DashboardSimulator.cs
Live ticket boardM05Ticket board tab: BindingList<Ticket> + BindingSource + ApplyTicketEvent, Escalated filter
Multi-user TicketHubM06Services/TicketHub.cs + Hub_TicketChanged (tenant filter, escalation toast, Subscribe / Unsubscribe)
Production checklist and configuration reviewM07Health · config tab: RealtimeHealthSnapshot, RenderHealth, healthTimer, LoadConfiguration, the checklist

What to try

ActionWhat you should see
▶ Start heartbeatthe clock and load bar move once per second with no click
Start Import / Cancel Import / Fail at 87progress every 10 records while the heartbeat keeps running; a cancelled and a failed run both re-enable Start
Publish Event / New ticket events (10) / Escalate selectedthe rows and notifications appear in every session of the same tenant; escalation also pops a toast
Tenant / Escalated onlythis session's board changes; other sessions are unaffected
Unsubscribe / Subscribethis session stops (and resumes) receiving hub events
Live mode, Cadenceevents received grow faster than updates applied; the cadence changes the tick rate
Counter +1 / Background updatea per-session counter; a pushed log line 1.5 s later with no click
Health · configPush expected / Polling off, active subscriptions, measured updates/min, the effective Default.json and HealthCheck.json, the ten-point checklist

Polling fallback. Add "enableWebSocket": false to Default.json and restart: connectionLabel shows No WebSocket, the Health tab reads Fallback mode / Polling enabled while work runs, and pushes arrive on the polls.