The sample code in this chapter contains a Race News Feed platform event object. As described earlier in this chapter, such objects can be used to define an asynchronous API for your application that applies the pub-sub communication pattern. In this use case, a mobile application (not included in this sample) is used by news reporters employed by the customers of your FormulaForce package. The goal is to ensure that whenever something not-worthy occurs in the application, they get real-time updates on their mobile devices.
The mobile application uses the CometD (https://cometd.org/) protocol in mobile applications' JavaScript to subscribe (listen) to the platform events from the Race News Feed object. Within the RaceService.awardChampionshipPoints method code shown here, the RaceNewsFeed__e object is registered with the Unit Of Work associated...