Build real-time applications with PubNub pub/sub messaging
Agent Success
Agent success rate when using this tile
94%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.29x
Baseline
Agent success rate without this tile
73%
You are building a personalized news aggregator where each news source publishes to its own PubNub channel. A user can follow up to 500 different news sources. When a news source publishes an article, it goes to that source's dedicated channel. The client application needs to receive articles from all followed sources in real time, and also needs to send "read receipts" back to each source's channel when the user reads an article.
Write a JavaScript module (news-feed-manager.js) that:
Assume a PubNub instance is passed in during initialization.
news-feed-manager.js file with a class or set of functions managing the subscription and messaging logic for the news aggregator.