New way of doing the Radar Books page, or The Backpack API

In the emerging tradition of constructing the O’Reilly Radar blog out of a growing number of loosely-coupled building blocks, we’re rolling out our new Books page, built on the backs of Amazon Web Services and the Backpack APIlaunched today.

From the outset we’ve known we wanted to share our current and recent reading list with Radar readers. Just how to do so was left as an exercise for a later time. And so we launched the site with a static page composed of a sprinkling of representative books, hard-coded and without much chance of being actively kept up-to-date. (There are some Amazon/booklist plugins for Movable Type, but there had been some issues getting them to play nicely with mod_perl.)

As we’ve moved into our respective Backpacks over the past couple of weeks, at least a couple of us have come to find it’s intermingling of wiki-ish writing and sharing space, lists, notes, and attachments indispensable. And so it only made sense to keep my list of current and recent reads in a Backpack list. It’s at this point that it dawned on me that we could gather our respective book lists — in much the same manner we do our linkblog postings — into an aggregated list on our Books page. While I was content to get by with a little scraping magic, it turned out that David Heinemeier Hansson, programmer-in-chief for Backpack and Ruby on Rails, was putting the finishing touches on a simple RESTian Backpack API.

So here’s how it works:

  1. Each of us maintains a publicly-shared Backpack page containing a list of books in a hacked-together asin/isbn : comment # notes to be ignored format.
  2. Every so often a script on the Radar server sifts through the list using the Backpack API.
  3. The script then visits Amazon’s web service and gleans some details for each of the books in question (title, author(s), thumbnail image).
  4. A smidge of formatting and the books are listed as you see them on our Books page. (The four covers at the top of the page are the first (available) of each of our respective lists.)

This way each of us maintains his own book list while — almost as a side-effect — contributing to the aggregate Radar book list.

Another chunk of process websourced.