BT

Instant Notifications Using Google’s PubSubHubbub Protocol

| by Abel Avram Follow 12 Followers on Sep 02, 2009. Estimated reading time: 1 minute |

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.

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.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Push to clients? by josef betancourt

Is InfoQ hooked into my Reader or PersonalBrain links? Last week I was just reading about "Web Hooks". Reminded me of an older effort for client side push: PushLets (that recently started looking into using AJAX).

Fascinating stuff. Pretty soon there will just be agents and notifications zooming in the cloud, humans won't even be involved, care, or even understand. (joke).

If you post an article on kernel regressions I'll know your snooping.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss
BT