Victus Spiritus

home

Rocking Chair, Portable Realtime Feeds ala CouchDB

12 Nov 2010


Imagine subscribing to your favorite real time feeds on the go, and having them automagically cached to your favorite local database. I like to think of portable feeds as a variant of Instapaper but for my rss reader. Look no further there's open source code that does just this.

In the past week or so Julien of Superfeedr hacked together a fork of Tyler Gillies' and Max Ogden's Couchpubtato. To see the app in action visit superfeedr.couchone.com. If you'd like to see the source code for Rocking Chair, the repo is at Julien's github.

Several apps serve precisely this type of function, but they may not be as web and network friendly as an HTTP responding database that you can bring with you. For starters I can replicate all my friends feeds very fast. Here's Max's write up that sums up why couchpubtato (and Rocking Chair) are so cool:

Why is this cool?

So I reckon you have some old and busted RSS or ATOM feeds that you need to pull from whenever you want updates, right?

Well, little buddy, it's time to enter the world of push!

Hook your pull feeds into the magic that is PubSubHubbubb (superfeedr.com does this for you... for free!) and they will push to a specific PubSubHubbubb subscriber endpoint whenever they have new content.

You might be asking "where am I going to get a valid PubSubHubbubb subscriber endpoint to store all of these awesome feed pushes"? Well, i'm glad you asked!

With Couchpubtato, you can make any Couch database act like a valid PubSubHubbubb subscriber endpoint.

I still don't get it

Ok, so lets say you want to embed a feed of upcoming calendar events on your sweet blog, but the calendar page only has a junky RSS feed! You can use Superfeedr to push new RSS updates in realtime to a CouchDB of your choice, which turns your previously junky RSS feed into a full JSONP enabled API for maximum client side widget goodness!

Here's an example of this whole thingy working: I log all Portland, OR 911 calls and make them available as ActivityStreams here: http://pdxapi.com/pdx911/feed?descending=true&limit=5