Saturday, November 24, 2007

RSS killer feature - Replies, via in-reply-to element

RSS feeds would be so much cooler if items could declare themselves to be "in reply to" other items or URLs.

This would allow the following awesome features:

  • Discussion threads within your RSS reader

  • A "find all replies to this post" feature in your Web browser or RSS reader

  • A "hide all replies descending from this post because I am SO TIRED of this topic" feature in your search engine or RSS reader

  • A reduction in anonymous comment flames, since this improvement to RSS feeds would encourage people to post replies to their own blogs under stable identities they invest in

The implementation would be dead-simple: add to RSS the "In-Reply-To" header we have had in email since the birth of the standard. This header is the bedrock of "the best known algorithm for threading messages."

We just need an RSS extension and namespace to hold the element, which would probably be called "inReplyTo" or something like that, and of course would exist at the item level. If the extension namespace were, say, "threading," a couple of related RSS items in the same feed might look like this:


<title>Drupal development full steam ahead on linode</title>


<guid isPermaLink="true"></guid>

<description>Well, I've been able to get off to a fast start here at linode. A very clean, lean and mean setup ...</description>



<title>RE: Drupal development full steam ahead on linode</title>


<guid isPermaLink="true"></guid>


<description>I see that like myself, you use the GNU Midnight Commander - it sure makes setting up a server easier ...</description>


But related items wouldn't have to been in the same feed -- they could be on entirely different websites.

This whole scheme burst into my head as I was catching up on some RSS feeds this weekend and saw the following in Google Reader (click on image for full size):

Google Reader screenshot

This looked broken.

See all those "RE:"s?? They are replies in the discussion forum for the virtual server I rent. I need to monitor this RSS feed for downtime, changes and upgrades to the server, but I end up drowning in all the replies, because there is no threading to hide them away.

So much else about Google Reader is broken these days. But this one actually isn't their fault. Email has had threading built in since RFC 822 25 years ago as I noted above, but RSS has nothing like it.

I looked in the spec, and the closest thing is the "source" element. But this element refers to an entire feed, not a specific item or URL. Its purpose is to "propagate credit" for the information in the item. It looks like maybe it could be repurposed for replies. Is this against the spirit of the element? I am not sure.

My guess is that inReplyTo should be its own element, for clarity. If you have people using "source" to mean "in reply to," then how can you tell when people are using "source" to mean what it originally meant, "I got this news via Feed X?" You'd have to look at what the element points to -- is it a feed or an item/web page? That takes a lot of work on the part of the reader author. Really, you'd have to do a lot of fetching.

Also, I can envision a scenario where you'd want to use both "source" and "inReplyTo" -- I find out about "Post Z" from Daring Fireball, so I put the Daringfireball feed URL as "source," but my post is a big rebuttal to "Post Z" so I put the URL (or guid) for "Post Z" as "inReplyTo."

Anyway, I also skimmed the RSS extensions to see if this showed up anywhere and never saw anything like "inReplyTo." I thought maybe the Trackback extension would have it, but that's all about pinging. Nothing really in Dublin Core ("relation" I couldn't quite figure out). The Comments extension is just that -- all about comments to a post, not posts relating to one another.

I'm really not sure how to get this going. Obviously, I can't force all the blog software hackers to add this to their tools, and then force all the authors to add this info to their posts, and then force all the reader hackers to add threading to their readers.

I do have a sort of RSS generation tool written in perl that I could use as a filter to add inReplyTo to my discussion group feeds. But I don't want to go back to hacking on my custom feed reader, I like the goodness of Google Groups .... Maybe the RSS filter could mash each thread into its own ginormous item, so it would work in Google Reader.

Some day when I have more time, I suppose.

Update: This was discussed for the Atom feed syndication format, but it doesn't look like it showed up in the (draft?) proposal. One alternate possibility would be to do <link rel=""></link> in Atom feeds. But I'm not sure having multiple link elements would be allowed under the RSS2 spec, and it's certainly not common in the wild.

Also, someone drew up a threading module for RSS1, but RSS1 is not in common use in the wild anymore, most people are building on RSS2 or Atom.


Jeff Schiller said...

Atom has a "Threading" extension since 2006. I had the same thought that you had here:

Anonymous said...
[url=]VIAGRA preis[/url] - VIAGRA BESTELLEN
[url=]VIAGRA Deutschland[/url] - VIAGRA Deutschland
[b]VIAGRA® kaufen
VIAGRA Deutschland
VIAGRA online kaufen
VIAGRA on line
VIAGRA alternativ
VIAGRA rezeptfrei
VIAGRA Apotheke[/b]

cheap viagra said...

hello buddy congratulation excellent post about RSS killer feature - Replies, via in-reply-to element thanks for sharing

Free Poker said...

This is really very informative site and all your articles are hot as hell, lots of useful stuff. One thing I just want to say is that your Ryan Tate - The Hack Blog is so perfect to me.
Our website: Holdem Poker Playing

Free poker said...

Great tips, thanks a lot!

Anonymous said...

A reduction in anonymous comment flames, since this improvement to RSS feeds would encourage people to post replies to their own blogs under stable identities they invest in. Homepage

Drupal Development Tools said...

Picking a content management system is highly vital I only use Drupal. Because As a result of the biggest government websites like the White House use Durpal, my decision was easy For my Drupal hosting I like GetPantheon including Drush integrations which software is best in your opinion?

Drupal for Education said...

Choosing your CMS is very influential long term I have used Drupal. Because SinceI found out the most well known colleges including Harvard and Yale use Durpal, I chose Drupal For our hosting I always use GetPantheon including features like fast cache responses which CMS do you prefer?