9rules - The best content from the independent web.

Back To Blog

Written by Scrivs, Mike, and Tyme. Subscribe To RSS Feed

Recent Blog Entries

Building the 9rules Network: Episode 3

Written by Colin Devroe on February 12, 2006

As I mentioned in Episode 2, I wanted to tell you how I used our page views to build our cache of member data. This episode is more of a documentation of my thought process than how I programmed it all to work. More of a why than how.

For quite a few months, we’ve featured the latest five post titles from a random set of our members. There are many ways I could have pulled this off, but I chose the Occam’s Razor approach. When I was given a choice between several solutions, I chose the simplest solution to implement, which was to use our members feeds as our primary means for collecting their headlines.

Once I had chosen how I was going to collect the data, I had to make a decision on how I’d automate that process. At the time, our server was little more than a 3-dollar linux box sitting in someone’s closet behind the extra toilet paper and the boxes of winter clothing. To be fair, that machine served us well for quite sometime, but it left us with little options when building robust automated solutions.

So how was I to automate the caching of our member data when I had very little access or control of our server? I used our page views. Each time our page was hit, I’d randomly load about a half-dozen of our member feeds and create a local cache of those entry headlines. Once the local cache was older than about an hour old, the next page view would end up looking for a new copy of the member feed. This solution was extremely sloppy, horrible with page load-time and weight, and did not add much value to our site. Yet, we had very little choice at the time.

The very first version of our 9rules member data cacher ran on lastRSS. After seeing its extreme limitations we quickly moved to Magpie, which allows us to parse every RSS version as well as Atom. We’re still using a customized version of Magpie to this day.

In our next episode, I’ll post some code to cache XML feeds locally, which could be of much use to many of you out there.

  1. Kimmo. Says:

    Link to “Occam’s Razor” seems to be broken.
    It should be http://en.wikipedia.org/wiki/Occams_razor
    not http://en.wikipedia.org/wiki/Okkams_razor

  2. Colin Devroe Says:

    Kimmo: Weird, both links work for me.

  3. Kimmo. Says:

    Weird indeed, now both links work for me too. Damn interweb :)

  4. marcelfahle.com » Blog Archive » Building th 9rules Network: Episode 3 Says:

    [...] olin D. Devroe has continued his tutorial series of building the 9rules Network. Check out Episode 3. RSS 2. [...]

  5. Derek Scruggs Says:

    RSS is great for this kind of thing. Did you look at FeedWordPress? It uses Magpie:

    http://projects.radgeek.com/feedwordpress

  6. Chris J. Davis Says:

    WordPress uses Magpie… I should know I integrated it. Nice write up as always Colin. Good to see behind the iron development curtain now and again.

  7. Sewar Says:

    Get updates by feeds is good idea, but if you can moderate members’ blogs i think it’s better to use pings because you just notify when there are updates.

    Update Services option in WP:http://codex.wordpress.org/Update_Services

  8. Dutch Directions » Blog Archive » Hoe bouw je een weblog-netwerk? Says:

    [...] 8217;n avontuur in WordPress te beginnen… Toen wees Marco me op een aantal artikelen op het 9Rules-netwerk. Het 9Rules-netwerk, voor degenen die dat nog niet wisten, is het [...]

  9. ThePodcastNetwork :: The BizBlog Show » Blog Archive » The BizBlog Show #07 - Colin Devroe Says:

    [...] the backend for 9rules can be found: Building 9rules – Part 1 Building 9rules – Part 2 Building 9rules – Part 3 This entry was posted [...]

Leave a Reply