Blog Torrent

A greatly simplified Bit Torrent experience.

GO TO THE NEW: Blog Torrent Preview Release

The Original Blog Torrent Proposal:

Objective

Our objectives for this project are:
  1. To make it completely effortless for complete neophytes to download large files via the Bit Torrent protocol
  2. To make it as easy as possible for people who have websites to share large files via the Bit Torrent protocol
  3. To make sharing a file as fast and easy as posting a file to a website.

If we pull this off--and we can-- we'll have made sharing four-gigabyte files as easy as sending an email to your friend. And that will change our culture significantly. If distributing large media files becomes easier, people will create more of their own works and will experience more work created by other individuals. Just as simple blogging software led millions of people to create their own news and commentary publications which now complement and compete with major corporate news outlets, similar distribution tools for audio and video can do the same with television and music. For blogging, the roadblock was html, and blogging software solved that problem by letting people type as if they were writing email. For large audio and video files, the bottleneck is bandwidth costs and the difficulty of uploading files to a blog. BitTorrent solves the bandwidth problem, but creating torrents and trackers is difficult. What we plan to do with Blog Torrent can solve the ease of use problem. And integrating BitTorrent capabilities with blogging will make the experience seamless for bloggers and readers. That's when things get interesting.

Table of contents

General Overview

Here's a general description of how the software solves these problems, for installation, downloading torrents, and posting torrents.

Installation

If both the tracker and the web interface are written in PHP but use no MySQL, installing the software will be as simple as transfering files to a web server. A local client is included in the web install, so after the web installation users can download it as soon as they need to. The local client installs silently the first time it is run, and behaves similarly to a browser plugin. The web install is the only installation which requires any effort on the part of the user. Anyone who's using this software on a friends' website, or on a public website, will never have to deliberately install anything, ever.

Downloading Files

For people to use bittorrent as their primary means of distribution (instead of optional, i.e. "or if you like, use bittorrent") then we need to make it so that offering only bittorrent as an option doesn't exclude a large portion of users.

One good way to do this is to attach torrent files to an executable client. For a demonstration of this functionality, try the current version of Battle Torrent at bannedmusic.org. Instead of downloading the torrent file, the user downloads an executable that contains a fully functional bittorrent client and the torrent file (say, "The_Grey_Album.torrent"). When the user runs it, the program begins downloading the Grey Album. The user can get files using bittorrent without needing to know or understand what bittorrent is.

Since this "executable downloader" shares most of its functionality with the tool for uploading files, it makes sense to wrap both of these tools into the same program. That's our local client. When the local client is already installed, the user won't need to download the executable again. And any user who has installed the local client won't need to install any additional software to share files themselves (on trackers that they have access to).

The best way to attach torrent files to this executable is to append the torrent file to the end of the executable. The executable can know its own length, and interpret any additional data as a set of instructions. This is easy to do in PHP, and it also gives us a way for the web interface to pass information to the client in other situations (like in the case of posting).

"Posting"

This is where all of the work is. Normally, the user would have to use some utility to make a torrent file. If they wanted to be sure to not scare away people who don't understand bittorrent, they'd also have to go through another process to make an executable downloader. Then they'd have to submit the torrent file to the tracker and begin seeding the file. All of this is complicated.

But if we make creating, uploading, and seeding a torrent file a single step, we've dramatically simplified the process. Here's how to do it:

  1. User logs in to web interface and selects "post a torrent"
  2. The web interface passes necessary information (login info, location of tracker, etc) to the local client
  3. The user runs the local client if it isn't installed already, or the client starts up automatically when the user clicks a link in their browser.
  4. The local client gives the user a dialog box to select a file to "post"
  5. When the user selects the file, the software generates a .torrent file, uploads it to the tracker, and begins seeding.
  6. It supplies the user with a link, that they can copy and paste into a blog or an email, for example.
  7. The link isn't to a file, it's to a PHP page that offers both the torrent file or a downloadable local client with the torrent file attached .

The web interface already knows all the important information: login, password, tracker URL, URL to upload torrent files to, etc, so there's no sense in making the user enter this info twice. The web interface can pass this info to the local client via the link or the "appended to the .exe file" technique described above.

The local client remembers login information. So once the local client is installed, users can post files to the sites they've used without going through the web interface (by right-clicking on a file or folder, drag and drop, running the program locally and choosing a file, etc). The "choose a file to share" dialog box includes a drop-down menu for previously used sites, if there are multiple sites.

The other cool thing about starting in the web interface is that it makes the system very easy to integrate with blog software, and different CMSes like Drupal, Wordpress, PHPnuke, or Indymedia platforms. The CMS just has to process the users' post (say, a description of the content they're sharing) and pass their login info to the web interface. Then the web interface just needs to pass the resulting link back to the CMS which can instantly make the users' post active. Or, if the user is posting a file before entering metadata, the local client bounces them to a webpage.

Download Page

One of the best things about bittorrent as opposed to search-based filesharing is that you find things you didn't know you were looking for. We need to preserve that here. So a key part of the software is a torrent page, that's like a standard tracker page only a little classier. There's a good example here: http://waxy.org/bt

In addition to showing recent locally-hosted torrents, the user can also put other peoples' torrents in this list without re-seeding them and fragmenting the pool of downloaders. So if you find torrent files hosted elsewhere, you can upload the torrent file through the web form (if you're an admin) or submit it the way you would post a folder using the local client ("choose file" dialog, drag-and-drop, right click). Your page can automatically generate an executable downloader for these torrents without re-seeding.

This page also features an RSS feed of all the torrents, with torrent enclosures (see below) so that feedreaders which integrate bittorrent (like torrentocracy are supported.

Basic Functionality

This is the simplest set of features required to make this thing simple, easy to use, and awesome. It also indicates many paths for improvement.

Web Interface

Installation

  • All PHP, no MySQL install
  • Clear error messages if PHP lacks write access to the necessary directories (e.g. when PHP is running as user nobody). Explain how to use chmod in FTP.
  • Contains clear instructions on port forwarding, for users behind routers.

Interface

  • Good web style. All CSS/XHTML, simple, themeable, instructions guide inexperienced users.
  • A good example: http://waxy.org/bt

User Flow

  • Web interface figures out its own location on first run
  • First user creates an admin account
  • Main page says "post" "files" and "settings". Only the files page is accessible without a login.
  • Settings takes you to a standard add/remove user admin interface.
  • Files page displays stats and lets users select torrents.
    • Selecting a torrent brings you to the download page.
    • If user is logged in as admin
  1. They can remove files from the list.
  2. They can upload files (tracked on other sites).
    • An example of how this should look: http://waxy.org/bt
    • Optional, but probably good to include in first verson: torrent page could include icon links to different files (one icon to download the local client, one for the magnet link, etc). That way, you don't need to go to another page.
    • An RSS feed of all the torrents is available. This feed uses torrent enclosures.
  • Post takes you to the post page
    • Post page instantly loads a magnet link (like sourceforge starts downloading) and says, "If this is your first time using battletorrent on this computer, you probably need to download this" and gives user a link to download the local client.
  • Web interface passes information to local machine
    • either via a magnet link that activates the local client, or
    • by tacking information on to the exe file.
  • There's a web form where the local program can login and upload torrent files.

#List of optional features

Local client

The purpose of Battle Torrent is to simplify the user experience for every aspect of BitTorrent use. An important component of this is a smooth, simple, and absolutely minimal user interface. In many situations, there should be no interface at all.

On startup

  1. Checks to see if it's installed (in theory, this is redundant, but whatev) and stops installing if it is installed.
  2. Checks to see if another bittorrent client is already installed. If so, it asks the user whether or not they'd like it to handle .torrent files (possibly, they have a more advanced client). Either way, it installs itself as a handler for magnet links
  3. If no bittorrent client is already installed, it registers .torrent files and battle:// URI's without asking.
  4. Somewhere in the client (or if the user runs the client cold) they should be able to choose exactly what it handles, but this choice shouldn't be pushed on all users.
  5. Adds right-click option "share with battletorrent" to all files and folders.
  6. Local program can get information passed to it from a URI.
  7. The local program is aware of its own length, and if its length is longer, it assumes that the extra length contains instructions, and it processes those instructions. If necessary it:
    • Downloads a torrent file and starts downloading the torrent
    • Prompts the user to choose a file and posts the file.

Downloading

This can either start from a magnet link or from an executable with instructions tacked on the end. In either case the client:
  1. Downloads the torrent file from the URL provided to a temp directory.
  2. Starts downloading the torrent (defaults to desktop, can be changed in preferences)

Uploading

User can select a file
  1. From an executable with special intructions (when poster is a first time user)
  2. By running the program cold
  3. Right click and drag n drop.

In the file select dialog box (which opens even in a drag and drop situation, to show the file selected) there's also a drop down menu for picking recent sites.

If the selected file is a torrent file, the local program will upload that to the users' website without re-seeding it. It will appear in the list of torrents as one located off site. Otherwise the software does the following with no prompting from the user:

  1. generates a torrent
  2. uploads torrent (logs in first)
  3. begins seeding torrent.
  4. presents user with a link to the download page for that torrent. User can copy and paste this into a blog or email.

Main Screen

Clean, simple.

'Download view' - this image is based on BitTorrent for OSX and some firefox stuff. It's just a general indicator of the simplicity we're shooting for.

  • The share a new torrent button would prompt the user to find a file, a torrent would be created, and it would be uploaded to their server, which would prompt them for supporting info like file name, description, etc.
  • The settings button would let the user set download / upload caps and specify account settings for their blog / website.
  • Downloads and seeded torrents should appear in a download manager window similar to Firefox or Safari.
  • Widgets should be simple and intuitive
  • Each file should have a pause/resume button.
  • If user is firewalled, the client makes an unobtrusive but animated logo in the right corner of the screen (like the red and white exclamation point for redhat update). When the user clicks it, it explains how routers decrease performance and includes a link on how to forward ports. The user can click a "don't show me anymore" checkbox to make the animated exclamation point go away.

download_view.gif

Website

Other Stuff

These are features that aren't necessary to the smooth functionality of this thing. They just make it better.

List of optional features

  • smart links (links like /bt/post instead of ugly php links)
  • more intelligent download page could detect if you have our plugin installed already.
  • integration with common blogs (WP, Drupal, MT) and indymedia software.
  • integration with blogger API stuff
  • CD, DVD rip, encode (share this DVD)
  • register this thing as the bittorrent plugin for browsers.

Advanced Features

http://bittornado.com/ supports some extra stuff. Like super-seed mode (a smarter way to be an initial seeder) and web-based seeding. It would be good if we could incorporate this stuff into the client and the tracker.

Web based seeding is especially perfect for people who have websites and bandwidth but don't want to get hosed (or get billed extra for bandwidth).

Enclosures

Here's a good link about enclosures, generally:

Enclosures are this thing in the RSS 2.0 standard (RSS is the standard for internet news feeds like blogs use) for letting the feed reader know that a file is included in the feed. The idea is that the feedreader would download the file at some point when the user isn't doing much else with the internet connection.

In practice though, enclosures don't seem that useful for torrent files. Any link to a torrent file is http://blah.com/yadayadayada.torrent which is really easy to spot out.

http://blogs.law.harvard.edu/tech/enclosuresAggregators

and this has some details as applied to bittorrent:

http://grumet.net/weblog/archives/2004/03/17/length_attribute_for_bittorrent_enclosures.html