Skip to main content

System context diagram

This shows every system and external service in play, and the connections between them.

How data flows

1

Ingest

Two pollers fetch data from SportMonks. ScorePoller polls all active matches on a schedule with Cockatiel resilience (timeout, circuit breaker, retry). MarqueePoller polls the marquee league at higher frequency with ball-by-ball data included.
2

Detect

Raw score data flows into MatchEventBus, which routes it through the event detection pipeline. Tier0EventDetector catches high-priority events (wickets, milestones). Tier1EventDetector catches routine updates (score changes, over completions). Events pass through CooldownFilter and StalenessFilter to suppress duplicates and stale data.
3

Build

DisplayStateBuilder constructs a UnifiedDisplayState from the current match data, ready for both API responses and APNs payloads.
4

Deliver

LACoordinator receives prioritized events and coordinates delivery through ApnsDeliveryService to all subscribed devices. Priority determines APNs priority header (5 vs 10).
5

Serve

The iOS app also makes direct REST API calls to the backend for on-demand data — fixture lists, match details, standings, etc. HubDataService builds data for the admin UI.

Connection details

If push notifications stop working, check the APNs auth token expiry first. These tokens are short-lived and need periodic refresh.