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 live sports data aggregator needs a unified event publishing service that can handle games across five different sports: NFL, NBA, NHL, soccer (EPL), and MLB. Their data provider sends raw events for all sports through a single stream, and the publisher must format and route each event correctly for downstream clients.
The challenge is that each sport has different terminology for its time periods (quarters, periods, halves, innings), different scoring mechanics, and different levels of event importance. A goal in soccer is as significant as a touchdown in football, but a corner kick is relatively minor. The publishing service must handle these differences correctly so that client applications across all five sports render the right labels and receive the right events on the right channels.
The service also needs to handle game lifecycle events -- games starting, reaching intermissions, going to overtime, and ending -- as separate trackable events that clients can use to update their UI state.
Produce a JavaScript file called multi-sport-publisher.js that:
Include a helper function or module for period label formatting that covers all five sports.