PubSubHubbub is an “open, server-to-server web-hook-based publish/subscribe protocol as an extension to Atom (and RSS)”. This protocol allows interested parties to get instant notifications when a feed is updated. The protocol was developed by Google and it can be found under the Google Code project with the same name.
Instead of a client constantly polling a server at regular time intervals in order to find out if the feed has been updated, the PubSubHubbub protocol turns the pulling approach into a pushing one. The client subscribes to a Hub and it is almost instantly notified when the feed is updated. The process is described by the project’s home page as following:
- A feed URL (a "topic") declares its Hub server(s) in its Atom or RSS XML file, via <link rel="hub" ...>. The hub(s) can be run by the publisher of the feed, or can be a community hub that anybody can use. (Atom and RssFeeds are supported)
- A subscriber (a server that's interested in a topic), initially fetches the Atom URL as normal. If the Atom file declares its hubs, the subscriber can then avoid lame, repeated polling of the URL and can instead register with the feed's hub(s) and subscribe to updates.
- The subscriber subscribes to the Topic URL from the Topic URL's declared Hub(s).
- When the Publisher next updates the Topic URL, the publisher software pings the Hub(s) saying that there's an update.
- The hub efficiently fetches the published feed and multicasts the new/changed content out to all registered subscribers.
Google has implemented the protocol for several of their services including FeedBurner, Reader (shared items), Blogger and, lately, Alerts. The protocol is open, licensed under Apache License 2.0, so anyone could use it. Furthermore, the hubs can be run on any server, they don’t need to run on Google’s App Engine.
Google has created a reference implementation of a Hub that can be used to test the publishing/subscribing process to see how it works. This video shows a demo of the working protocol in action.