Internet technology hosted by Berkman Center

Experimenting with BitTorrent and RSS 2.0

Thursday, March 11, 2004

We explain how BitTorrent works as an RSS 2.0 enclosure. By Andrew Grumet.


BitTorrent downloads are initiated on a desktop PC by launching the BitTorrent client on a special type of file called a ".torrent". The .torrent is small, containing just enough information to download a typically much larger file. We call the big file a BMO, which stands for "Big Media Object".

File transfers can proceed at greater speed and at lower cost to distributors with BitTorrent than with the traditional method, particularly for newly released files. But the downloads are still governed by the size of the BMO and the speed of the user's network connection. The user clicks and the user waits.

RSS 2.0 provides an answer to this "click-wait system" called enclosures. When it encounters an enclosure, a supporting news aggregator can make note of the fact that a download is available. Checking its notes later, the aggregator will initiate downloads overnight so that the item is available on the user's hard drive the next morning.

The leap is to recognize that today's news aggregators can download .torrents as enclosures. We just need to add an auto-launch mechanism that fires up BitTorrent when a new .torrent arrives.

It's a funny idea, using a system designed for 100MB downloads to retrieve a 25kb .torrent. But the funniness is a red herring. The end goal is the same, the only difference is how we get there.

How to build an RSS feed with BitTorrent enclosures 

Build an RSS feed with one item per .torrent file. Add an enclosure sub-element of item, that looks like this

<enclosure url="" length="25876" type="application/x-bittorrent"/>

Key point: the length field specifies the size of the .torrent, not the size of the BMO.

Here is a feed with enclosures for the latest .torrents from the LegalTorrents.Com site:

How to connect BitTorrent to the news aggregator 

We are aware of a couple of different strategies for connecting BitTorrent to the news aggregator. The end goal of all of these is to launch BitTorrent against the newly arrived .torrent enclosure.

One strategy is to program the news aggregator to track .torrents and initiate the launch. The Bit Torrent Integration Tool takes this approach to automate BitTorrent downloads from the Radio Userland aggregator.

A second approach is to run a helper program outside the aggregator that watches for newly arrived .torrents in a specific folder and starts a download for each. This could be a specialized BitTorrent client, such as btlaunchmany, or an operating-system hook that works like Adam Curry's RSS2iPod folder applescript.

What makes this interesting 

First, RSS and BitTorrent complement each other naturally. RSS was designed to report freshly available content, which is exactly where BitTorrent shines. RSS 2.0 enclosures were designed to automate the download process that BitTorrent optimizes.

Second, combining the two should reduce the barrier to entry for small broadcasters. While not a new idea, video blogging has always borne a bandwidth cost. Combining BitTorrent's cost savings with widely available RSS emitting tools should, for example, make it possible for a small group of motivated people across the world to create their own news channel.

Future directions 

Support the creation of better tools---and create better ones ourselves---for production and consumption of BT-enclosure feeds.

Work with Feedster or others to produce keyworded BT-enclosure feeds.