As Matt announced earlier this week, Dotspots now as a PubSubHubbub hub, hosted by Superfeedr.
DotSpots enables anyone to update the news in real-time with dots: mini-blog posts, including videos, pictures, documents and links, that appear in context on all relevant news articles.
Using superfeedr’s hub is quite easy and involves 2 steps :
- Adding the discovery to the RSS/atom feeds. This is just a small XML snippet to indicate that a given feed has a hub and its location.
- Pinging superfeedr. Even though we always failover to polling, it’s also always better if you can ping us when a feed has been updated.
I asked Matt some feedback on the process of using Superfeedr’s hub, and he kindly sent me the following :
Turning on real-time updates with PubSubHubbub was really easy. We use the Rome library to output Atom feeds for a number of different views on the data. We added a simple hub link to each feed to do this:
Our architecture already includes an asynchronous queue of events for mutation of different objects. We just needed to add another listener on the events for dot creation and modification that notifies the Superfeedr hub of changes. When a dot is modified, the event queue notifies the PubSubHubbub notifier, which then pushes out the updates to any of the feeds modified by the action. Notifications use the built-in Java support for HTTP:
As you can see, it’s quite straightforward… You can start today : Setup a PubSubHubbub hub