discourse/discourse — pull request #2114 by julien51 (2014-03-12 20:03:52+00:00)
Title: Adding PubSubHubbub support for existing (published) RSS feeds

There are probably a lot of services polling the RSS feeds from discourse for a lot of reasons. (I built a small IM bot that lets me get notified when people add content to topics I care about for example).

Now, polling Discourse' feeds is a waste of resources for Discourse and the poller if done too frequently and frustrating if it's not not frequent enough (delays!). [PubSubHubbub](http://code.google.com/p/pubsubhubbub/) is an open protocol that solves that thru the use of Hubs who are in charge of faning out the updates.

This PR adds PubSubHubbub 0.3 support to the RSS feeds served by Discourse. By default, this will use a [free cummunity hub](http://pubsubhubbub.superfeedr.com/) provided by Superfeedr, but that can be configured to use any other hub (including [Google's community hub](http://pubsubhubbub.appspot.com/)).

PubSubHubbub is also good for SEO as it improves content discovery for search engines.

As for the implementation, the 'meat' of it consisted in adding a `FeedObserver` which observes the `Post` and `Topic` models in order to trigger `HTTP POST` requests to the designated hub. Tests are included.