This article is a stub. You can help the IndieWebCamp wiki by expanding it.
PubSubHubbub (PuSH) is a notification-based protocol for publishing and subscribing to feeds/streams in real time. Currently there are no known indieweb sites that subscribe to anything using PuSH, but there are a few separate-UI indie-readers that subscribe to h-feed using PuSH.
You should implement PuSH for your home page updates so that IndieWeb readers (like shrewdness) can:
- promptly receive your posts when you publish them
- and avoid polling your server with unnecessary traffic
There are several indieweb sites producing PuSH notifications, and a few indieweb-centric applications that consume them (see in particular indie readers, Shrewdness and Woodwind).
Tantek Çelik uses Falcon to send PuSH notifications from his site tantek.com
Aaron Parecki uses p3k to send PuSH notifications for each item in his aaronparecki.com notes and articles Atom feed files since ????-??-?? (at least 2014-??-??).
Bret Comnes sends PuSH notifications for his bret.io Github Pages/Jekyll Atom feed file since 2014-03-16.
Kyle Mahan uses Red Wind to send PuSH notifications for new/edited posts and new mentions in his kylewm.com Atom feed file since 2014-03-23
- Now also sending notifications for updates to the main h-feed at kylewm.com, using a hub at superfeedr.com. Confirmed working 2015-02-21.
Barnaby Walters uses Taproot to send PuSH notifications for each new post on his WaterPigs.co.uk homepage HTML feed using PuSH 0.4 and Google’s hub since 2014-03-25.
David Shanske uses WordPress and the PushPress plugin to send PuSH notifications since 2014-02-16.
Matthias Pfefferle uses WordPress and the PubSubHubbub Plugin (selfdogfooding) to send PuSH notifications since 2011-01-29.
User:cweiske.de sends PuSH 0.4 notifications since 2015-04-01 using his own hub, phubb.
Publish and Consume a PuSH-enabled feed
PuSH 0.3 supported push notifications only for XML feeds, PuSH 0.4 generalizes this to allow publishers to send push notifications for any HTTP resource (e.g. h-feeds). If in doubt, use the newer spec, 0.4.
See the main article: How to publish and consume PubSubHubbub.
WordPress Plugins for PuSH
There is a plugin called "PushPress" which you can install on your self-hosted WordPress install.
An alternative, that also supports PubSubHubbub v0.4, is the PubSubHubbub Plugin.
If you're using WordPress.com, they already support PuSH by default (likely using that plugin).
Subscribing to Fragments
Superfeedr also offers the unique ability to subscribe to fragments on a page, using the # symbol. For example, if you subscribe to http://tantek.com/#.hentry, you will receive POST to your webhook/callback endpoint with the content of the first element of class "hentry" on http://tantek.com/
This should be seen as an optimization. A minimal consumer can simply re-fetch the resource itself when it receives a ping.
Testing your PuSH-enabled feed
There are several ways you can test whether or not your PuSH feed and pings are working properly:
Most popular RSS Readers do implement PubSubHubbub, you can just subscribe to your feed on one of them, and see if the update as been propagated after you added content.
- subscribe to your home page from a Status.net account
- publish stuff on your home page
- see updates appear in real time on your Status.net account
There are several XMPP/IRC bots which allow you to subscribe to feeds and be notified of updates via any XMPP or IRC client. You’ll need an XMPP account, or an IRC client.
Notifix is a bot (see above for source code). It's constantly connected to irc.freenode.net. Send him a private message like +help to see available commands. Subscribe with +subscribe <feed>, publish your content and see if you get the ping straight via IRC.
- I have had better experiences with notifixlite than PuSH Bot --Waterpigs.co.uk 03:16, 5 June 2013 (PDT)
Testing your PuSH Subscriber
- http://push-pub.appspot.com/ is a useful application for testing your subscribing code. This is a known-working PuSH 0.4 publisher, so you can subscribe to it, post an update, and confirm that you received a ping from its hub.
See https://code.google.com/p/pubsubhubbub/wiki/Hubs for more of them.
Testing your hub
push-tester is a tool that mimicks a blog with h-feed and h-entry and allows posting new articles with a single click. A configurable PuSH hub is notified about the new post.
Public instance: http://push-tester.cweiske.de/
The following implementations consume and subscribe to PuSH feeds: