A library for Google/SixApart pubsub hub interaction http://projects.haskell.org/pubsub/
|Latest on Hackage:||0.11|
This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
This package is an early-release of the webhooks / publish-subscribe
protocol that http://pubsubhubbub.googlecode.com/ is working and
rapidly deploying for various Google services.
The protocol itself isn't tied or limited to a Google service; a
number of hubs have been created and deployed already (see the
above URL for list.)
This Haskell package adds support for working with these
HTTP-based publish-subscribe hub servers, i.e., you may
subscribe to notification to URLs ('topics') from a hub and it
will push updates down as they occur (rather than you polling.)
== Getting started ==
The protocol is dependent on having some callback/endpoints
to forward 'topic' updates to you locally. There's a number of
ways of providing this in Haskell...for testing purposes, I've
included a 'fastcgi' proxy/relaying script that handles this;
see examples/Main.hs It operates by forwarding incoming requests
to a local server for processing -- the thinking being that
it provides a robust web front-end, leaving your basic Haskell
code to do the interesting bits of proccessing the pubsub
notifications. An example of how this could be done is provided
in examples/Feeder.hs which uses the pubsubhub service that
To use, you need to:
* build the cabal package..(!)
* Make the fastcgi script pubsub.fcgi available on
* Adjust the settings at the top of examples/Feeder.hs
to match your local settings for the script's URL +
settle on a hub to use.
For actual code / documentation on the bits that implement the
very-straightforward PubSubHub protocol, see Web/PubSub.hs
Initial release of PubSubHub Haskell package.