PubSubHubbub

PubSubHubbub differs from the rest of the implementations because it is a fully push-based protocol. All of the content between publishers and subscribers runs through centralized hubs, but this protocol is completely decentralized, open source, and free. Anybody can run a hub and publish and subscribe to content. There is no single entity in control of this system. However, this is a server to server protocol and requires public-facing servers end-to-end. So although this protocol isn’t used directly by end users, it makes it possible for end users to get almost instantaneous updates from the publishers.

In the PubSubHubbub workflow, a publisher specifies a hub server in the RSS or Atom feed. Every time a publisher adds or updates content, it pings the hub to announce that the feed has been updated. After receiving the ping, the hub checks the updated RSS file for differences and sends them via POST request to any subscriber that has requested it. During the subscription process, each client specifies a callback URL, and it’s this URL that the hub POSTs to as new data arrives.

The Protocol

As the name suggests, the PubSubHubbub protocol has two major components: publication and subscription.

Subscribe

The Sub part of PubSubHubbub is subscription. When your main goal is to collect aggregated content from around the Web in real time, this is the most important part. It’s a bit different from subscribing to RSS feeds because it involves two servers, and instead of you ...

Get Building the Realtime User Experience now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.