XML Syndication

July 5, 2008 – 3:22 pm by Lord Ravenclaw

Syndication

XML Syndication is a means of distributing content to other websites and users in a quick and easy format. It can be used to syndicate summaries of content, all content, updates, anything the creator needs to be passed out in a simple to use format. These are commonly known as ‘feeds’. Most of you use them in some form or another. I’m sure most of you either have a feed reader, or use Firefox addons to do so, or even use iGoogle to load content from your favorite websites. PatronusCharm also has feeds. We use the Atom feed specification (as opposed to RSS) currently. Atom is a superior design, though not quite as widely used as RSS is. Most readers can handle both quite easily.

PatronusCharm uses feeds for a number of different aspects of the site.

  • Latest updates. Each time a story is updated, this feed is updated with the last ten updates.
  • Latest news. My news posts trigger a feed update.
  • Story feeds. Each time a specific story is updated a feed will be updated.
  • User feeds. When a user updates it updated their feed containing all their stories.

These are the four currently accessible types of feeds in use at PatronusCharm today. However, upcoming in 1.0.2 two new feeds will be appearing. First, a variation on user feeds which posts chapters (and a decent length excerpt) for use by XML feed readers. Second, a category feed, which will alert to updates on a specific category or a combination of a primary and secondary category, e.g. Action/Adventure, or Action/Adventure/Timetravel.

The four current feeds can be accessed as follows:

Latest update: http://www.patronuscharm.net/x/latest/
Latest news: http://www.patronuscharm.net/x/news/
Story feed:  http://www.patronuscharm.net/x/story/<storyid>/
User feed: http://www.patronuscharm.net/x/user/<userid>/

I’m currently reworking how feeds work however, and user feeds are the first up. Firstly they will become more friendly, they will allow syntax such as /x/user/LordRavenclaw/ in 1.0.2. I’m also working on a way to ensure that XML feed readers see each successive update as a new entry, rather than a reordering. This way XML feed readers will alert one each time they update. This also goes for latest updates, as items having already appeared in the feed are considering updated, rather than new.

In general, feeds are being reworked. I wrote the class which generates the Atom feeds well over three years ago and it needs a great deal of restructuring. That’s my current project for PatronusCharm.

  1. 2 Responses to “XML Syndication”

  2. Your user feeds come with “cache-control: no-store, no-cache” which is very bad as it disallows well behaved proxies and other caching systems to not repeatedly re-download an unchanged feed. Even “must-revalidate” is a bit too much, in my opinion.
    Please change the cache control header to something reasonable like “max-age=86400″ so aggregators/feed readers won’t hammer the site.
    Also, make it possible to use conditional get to verify the version in cache is still the latest without re-downloading it.
    You can email me with technical question and I’m willing to help with whatever you need design/code/testing-wise.

    By wolf550e on Jul 27, 2008

  3. I love feedback like this :)

    I was slightly confused by this as I purposefully removed any cache control header from the feeds long ago. I couldn’t figure out why until I did a little digging.

    Apparently, using sessions as I do throughout the site by default adds the aggressive cache headers. I’ve since changed my local copy and will be synchronized with the development copy later on tonight once all my changes are at least mostly working.

    I’ve been reworking feeds completely as I said above, and this works into it well. Thanks for bringing it to my attention, I’ll email you for some testing assistance later.

    By Lord Ravenclaw on Jul 27, 2008

Post a Comment