Making a Case for Pingbacks

I tested a first version of a video commenting system last week. As I'm writing this nine people have uploaded their own video comment to my original video. But as I've said before I'm a bigger fan of a distributed hyper-structure than a centralised linear structure like my first video commenting system. Just for fun I'll see if everyone can get the best of both worlds with version two. My goal with this text is to make a case for pingbacks and how they can be used to create a video commenting system.

All About the Links

The World Wide Web is a chaotic network of documents linked together by… well, links. If we have a random document (b) the connections would look like this:

Simple hypertext construction.

There will be a series of documents (a) that have links to our document. And our document will itself contain links to other documents (c). With the web and our browsers work right now it's only possible to move right in the model. You start at a document where you can follow links to other documents, but you can't see which documents are referencing the one you're reading. I can't help wondering why this is has not been a part of the web forever. Only by going left in the model you can get an overview of a topic, and only then you can enable ‘conversations’ between documents.

Trackbacks and Pingbacks

That's where trackbacks/pingbacks enter into the picture. With trackbacks/pingbacks it is possible to contact a document (b) and recieve a list of documents (a) that have links to it. This is effectively a distributed comments system.

I'll focus on pingbacks for one simple reason: Trackbacks only works with HTML pages, pingbacks work with any kind of file. Since we are talking about creating a video comment system it only makes sense to talk about pingbacks.

Fortunately the pingback system is so simple that it should be a crime. Whenever you create or edit a document (eg. when you post a new entry to your blog) you send off small messages to the documents you're linking to. The messages are then picked up by the server of that document where they'll sit and wait to be retrieved.

In the perfect world your browser would then be able to display all the documents that link to the one you're reading in a sidebar (or whatever). In the real world only a very small fraction of servers support the pingback system, and an even smaller fraction of these support the part of the system that makes this possible. I have to start somewhere, and history shows that if you create a demand from users the people who run the servers/create the software will get up to speed.

That's all that's need really. If all servers and all software that create web documents supports the pingback system it is trivial to make a small piece of software that takes any document, retrieves a list of referencing documents and outputs a list of links. If you had this for all documents you would be able to go both right and left in the model above.

Rich Media Makes an Entrance

Out of the box pingbacks work just as well with audio and video files as it does with text documents. There are things to consider of course. If one of the goals is to make playlists of these files they must be able to stand alone without a containing HTML file. Our media players don't display HTML pages, nor should they. Therefore all relevant metadata must be saved in the rich media file itself. Otherwise it can't be displayed to the listener/viewer.

I have tried to figure out how to extract metadata from Quicktime files, but so far I've not been succesfull. It must be doable though. In my perfect world I would be able to save at least:

  • Title
  • Author
  • Length
  • Still frame (in the case of video)

In the real world audio and video files are more often than not contained in HTML documents. It's much easier for the readers/listeners/viewers that way. They only need one program open: Their browser. If we are just making links from (b) back to (a) in the model above this doesn't matter. However for an automated video commenting system to work well it would be really useful not only to know that a reference exists, but also know what type of reference it is (text, audio or video). If you don't know what type of file you're fetching it's not possible to collect all video comments in a playlist for example.

If all files stood alone this wouldn't be a problem. Whenever a file is sent over the web a bunch of so-called headers precede the actual file. One such header (Content-Type) tells you what type of file is being sent, so it's very easy to distinguish video comments from text comments and vice versa. But if a reference is a video file contained within an html document there are issues. A model with the referencing document in the middle looks like this:

Hypertext construction.

Suddenly there are two documents (one text, one video). The easiest way out of this problem is to treat the documents as alternate versions of the same document instead of two seperate documents. For that to work there needs to be links between the HTML document and the video file. The goal is that when you retrieve the HTML document you would know that an alternate video version exists (and vice versa). In HTML this is easy. You just add the following in the <head> section: <link rel="Alternate" type="video/quicktime" href="http://www.yourdomain.com/path/to/video.mov" />

For this to be 100% effective the video file would have to include a similar mechanism. For the time being no such mechanism exists. Instead anyone who posts their videos contained in HTML documents (that's probably 100% of all videobloggers) must ensure that pingbacks go to their HTML document and not directly to their video file! Then each HTML document must have the <link>-element so that it's possible for an automated service to find the alternate video content.

In fact, by using this <link>-element it would be possible to use trackbacks as well as pingbacks. Using the <link>-element should be seen as a patch-solution and not the real deal as it adds quite a bit of overhead (the HTML document would have to be fetched far more time than it would be viewed). On the other hand it is a nice compromise.

This is the point where I go to bed instead of finishing the piece. I thought I would be able to finish tonight, but I'm way too tired and I have to get up in the morning. Tomorrow I will finish up with all the good stuff: Automating the link gathering (ie. how to fetch all the videos), possible uses (like audio and video playlists) as well as a quick guide on how to turn pingbacks on.

Possible Uses For All This

The most obvious use for pingbacks is to simply show a list of webpages that link to the current one right there on the page — just like normal comments. Unlike normal comments visitors will have to follow links to read what people have to say. This encourages longer, more thought out comments than the quick fire-and-forget comments fields. A simple, first implementation would look like a list of Trackbacks (with the exception that not a lot of metadata (like author and an excerpt)can be displayed about videos at this point). Since all browsers have sidebars of one kind of another it would be a nice browser feature of the list of pingbacks would be displayed in the browser instead of on the page.

The next step would be to include information on what type of comment is being listed. For example a small icon could be displayed next to each comment.

And that's where the playlists come into the picture. When you know who have sent a pingback, and you know what kind of content the pingback is, you can easily make a playlist. You could either do this on your own server (if you have access to a programming language) or on a site like videoblogging.info. The process could go like this:

  1. Enter an URL into a form field (or click a button in your browser).
  2. Choose which kind of reply you want:
    • HTML page with a list of links (with filters on text, audio and video).
    • Playlist of video comments.
    • Playlist of audio comments.
  3. Click the ‘Go!’ button.
  4. Wait for the server to fetch a list of comments for you.
  5. Sit back and enjoy your video playlist (if that's what you requested).

The format of the playlist needs to be somewhat standardized. For audio files I'm pretty sure M3U can be played by most players. For video SMIL is the obvious choice. If you wish to share your playlist with others it would also be trivial to server each playlist in the XSPF format for easy integration with services like WebJay.

It is the process of gathering links, sniffing for the content-type and finally creating playlists I'm working on implementing right now. The programming itself is not hard (school is just taking time away from sitting at the computer). The hard part is that currently there is not many pingback enabled websites and thus I hardly have any data to test with. Most importantly I don't have any audio/video comments to test my system with. More people need to pingback enable their websites.

Enabling Pingbacks

You need to have two things to enable pingbacks. First you need to send out a notice with every document that it's pingback enabled, then you need a pingback server to save all the pingbacks you'll recieve.

The first part is the easy part. You have two options: Either to send out a custom HTTP header, or — with HTML documents — use a <link>-element. If you are on your own domain you can most likely add the HTTP header easily. It should look like this: X-Pingback: http://www.yourdomain.com/path/to/pingback/server/ This header should be sent out with every pingback enabled document.

If you for some reason can't send out the HTTP header you can use the <link>-element. Since this can only be applied in HTML documents it's less usefull than than the HTTP header. The link element must look exactly like this: <link rel="pingback" href="http://yourdomain.com/path/to/pingback/server/" />, or if you are not using XHTML: <link rel="pingback" href="http://yourdomain.com/path/to/pingback/server/">

If you are not on your own server (if you're using TypePad for example), you need to lobby your provider to enable pingbacks (and probably to provide a pingback server as well). The pingback specification as well as the information on pingback.extensions.getPingbacks(url) contains all the technical information. In addition to that you need to be able to add the <head> section: <link rel="Alternate" type="video/quicktime" href="http://www.yourdomain.com/path/to/video.mov"> code to your video entries.

Pingback Servers

Pingback servers require more work. If you're lucky you're using Wordpress as your blogging tool. Wordpress already has a pingback server included. There is only one problem with the Wordpress pingback server. It doesn't include support for the pingback.extensions.getPingbacks(url) function. This is crucial if you want to make playlists of video comments. I doubt it would be hard to write a plugin for Wordpress to add this function, but I don't have any experience with Wordpress so I can't write it myself.

If you're not running Wordpress, but you are a videoblogger I can help you out. As a part of my research I'm writing a pingback server, and I can provide pingback services for any videoblogger who wants it (I hope). So if you want to try all this out, but can't get your own pingback server up and running contact me and we'll talk.

If you're on a hosted service it doesn't make sense for me to run your pingback server. If your provider can be lobbied into enabling pingbacks for your documents they can be lobbied into providing a pingback server.

No comments

Add your comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p>
  • Lines and paragraphs break automatically.

Recent photos

About the blog

This is the personal website of Andreas Haugstrup Pedersen: commentary on media, communi­cation, culture and technology. Read more»