IndieWebCamp is a 2-day creator camp focused on growing the independent web

PubSubHubbub

(Redirected from PuSH)


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.

Contents

Why

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

IndieWeb Examples

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

Tantek Çelik uses Falcon to send PuSH notifications from his site tantek.com

Aaron Parecki

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

Bret Comnes sends PuSH notifications for his bret.io Github Pages/Jekyll Atom feed file since 2014-03-16.

Kyle Mahan

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

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

David Shanske uses WordPress and the PushPress plugin to send PuSH notifications since 2014-02-16.

Matthias Pfefferle

 Matthias Pfefferle uses WordPress and the PubSubHubbub Plugin (selfdogfooding) to send PuSH notifications since 2011-01-29.

How To

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:

RSS Reader

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.

Status.net

  1. subscribe to your home page from a Status.net account
  2. publish stuff on your home page
  3. see updates appear in real time on your Status.net account

Bots

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

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.

Hubs

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.

Consuming Implementations

The following implementations consume and subscribe to PuSH feeds:

Discussion

Issues

  • There are only 3 hosted hubs according to this list of which the one run by Google looks like a side-project (and I suspect it does not offer any service level guarantees) and I haven't heard much about Ayup. Which essentially means there is only one hosted hub to speak. Hubs are complex by design and therefore not something indieweb people can/should run themselves. This is not a healthy situation for something to be considered as indieweb infrastructure -Www.sandeep.io 06:09, 3 July 2013 (PDT)
    • That's the same problem you have with IndieAuth --Notizblog.org 06:32, 3 July 2013 (PDT)
      • I agree, but that says nothing about what you think about the problem described above. -Www.sandeep.io 13:01, 14 July 2013 (PDT)
    • The 'side project' assessment about the Google hub is both wrong and ill-intended. PubSubHubbub is actually key to Google's crawling capabilities and we can safely expect Google to keep maintaining it. (unsigned comment by Julien from 2013 July)
      • Why would you assume ill-intent? Google's hub does not seem like an official product/service (I haven't found any references claiming otherwise). It's just a URL and associated code. The video says nothing about the hub and only talks about Google acting like a subscriber and also emphasize very limited use: "There is a very limited amount in which we will use pubsubhubbub to help improve our crawl". Nothing about the hub is official so I have no choice but to assume it's a side-project unless you cite references clearly stating otherwise. -Www.sandeep.io 13:01, 14 July 2013 (PDT)
      • I can't imagine this is true anymore, as it seems very much unmaintained. https://code.google.com/p/pubsubhubbub/ has not had any substantive changes since Bret Slatkin stopped working on it in 2011. Kylewm.com 13:59, 28 February 2015 (PST)
    • There are a bunch of OSS implementations of PubSubHubbub hubs that *you* you use, or you could also write your own. Not sure why this would not be a *healthy situation*... :0 (unsigned comment by Julien from 2013 July)
      • If I don't want to take on the complexity of running a hub (which IMO, is what is attractive about PuSH) and pending clarification of the official status of Google's hub, there is only one hosted hub "out there" which makes it a SPOF. -Www.sandeep.io 13:01, 14 July 2013 (PDT)

See Also