Deliver real-time sports scores, play-by-play, and scoreboards with PubNub
Does it follow best practices?
Evaluation — 100%
↑ 2.94xAgent success when using this tile
Validation for skill structure
A sports media startup is building a backend service that receives raw scoring data from their NFL data provider and re-broadcasts it to their PubNub-powered client applications. The data provider sends webhooks whenever a scoring play occurs (touchdowns, field goals, safeties) as well as non-scoring events (penalties, turnovers, quarter changes).
The service needs to normalize these raw events and publish them to PubNub so that multiple different client applications -- a live scoreboard, a play-by-play feed, and a league-wide score ticker -- can each subscribe to exactly the data they care about without receiving unnecessary traffic. The service must also ensure that events can be reliably ordered by consumers even if network conditions cause out-of-order delivery.
Produce a single JavaScript file called nfl-ingestion-service.js that:
The code should be a complete, runnable Node.js module (assuming PubNub credentials are available as environment variables).