Martin Atkins (mart) wrote in apparentlymart,
Martin Atkins

HTML Social Network in Atom

Some time ago I posted about HTML Social Network, which is essentially just a bunch of link "rel" attribute values to indicate relationships between people and social objects.

One limitation of that approach, though, is that it lacks time information. You can't take the link relationships on an arbitrary HTML page and build an ordered list of (for example) status updates without additional context to give you the date and time of publication.

The obvious existing standard for time-based publishing is Atom, but the problem with Atom is that there's no way to know without out-of-band information that Twitter's Atom feeds are of status updates, and Flickr's Atom feeds are of photos, and (although HSN doesn't have a relationship for this right now)'s feeds are of tracks a user listened to recently. Action Stream services currently have to hard-code various services in order to present results in the correct context.

With this realisation, the obvious answer is to marry the "rel" attribute of HTML with the time-based publishing of Atom. Rather than publishing merely relationships between URLs, let's instead publish relationships between an Atom feed and its constituent entries, which themselves contain URLs. We can infer (using Atom auto-discovery) that a given Atom feed is a stream of information about a given resource. Here's one possible way to encode this:

<feed xml:lang="en-US"
  <title>Twitter / worstusernameevar</title>
  <link type="text/html" rel="alternate" href=""/>
  <subtitle>Twitter updates from Worst Evar / worstusernameevar.</subtitle>
  <entry ahsn:rel="status-update">
      <title>Reading about HSN in Atom.</title>
      <link type="text/html" rel="alternate"

Of course, I'm not wedded to this encoding, just the general principle of putting HTML's rel attribute into Atom. I'm open to suggestions of how to do it better. Though I called it AHSN here, really this can be generalized to all values of rel in HTML.

Obviously for backward compatibility for now Action Stream implementations will have to hard-code some assumptions such as " feeds have an implied rel of status-update", but hopefully new services can start to include this extra information so that Action Stream services can start to handle these things intelligently without needing to hard-code every possible publishing service.

As usual, I'm open to suggestions about how this idea can be improved.


  • Moved to TypePad is now hosted on TypePad rather than LiveJournal. All of the old content remains over here in LiveJournal land, but those who are…

  • Moving the Goalposts

    In the few weeks since I published the first drafts of AtomActivity, ActivitySchema and friends several things have come about: FriendFeed is…

  • Activity Streams and Comment Aggregation

    One pain point that exists for activity streams right now is the dispersal of responses over various networks. When I post a blog entry like this…

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.