Comment 1 for bug 339772

Revision history for this message
In , Gervase Markham (gerv-mozilla) wrote :

Q and A:

* Why is it bad to pass this off to a helper app again?

All the current bittorrent clients have terrible UI, and require an extra
install. It would be great if a user could click a .torrent link and have the
file downloaded to disk using the Download Manager, just as any other file.

* Why is it a problem to do this task with a plugin?

Plugins are for rendering web content in the browser.

* What about a download manager plugin, then?

This is roughly what's being suggested. It might start as an external add-in
(assuming that's technically possible), but the big value comes from being
integrated by default.

* What about <img src="blah.jpg.torrent"> ?

The BitTorrent protocol isn't suited for that sort of thing. For a start, it's
slow to get moving, and has a co-ordination overhead.

* What about a torrent:// URL scheme?

There's no such protocol. And if there was, other browsers wouldn't understand
it. And it would require all the info in the .torrent file to be encoded in the
URL - that could make the URL longer than is permitted.

* How would you handle the UI?

Ideally, downloading a file over BitTorrent would be as simple as downloading it
over HTTP. Therefore, we would need to make quite a few choices for the user
that other BitTorrent clients expose.

My idea is as follows:

- Download appears in download manager just like any other, with progress bar
from 0 to 100%.
- The user has no idea which pieces have been got and which haven't.
- There is no way to prioritise one torrent over another.
- Use various tricks to guess at user's u/l and d/l bandwidth, and set
parameters related to that.
- Uploading continues until either:
  - The user exits the browser
  - The user has sent 150% (hidden pref) of the amount of data received.

There are error conditions specific to .torrents we would need to work out UI for:

- No source of a particular piece
  - This can be determined up front; how do we tell the user?
- User is behind a firewall and so their download will suck
  - It's a shame .torrent files don't contain an "alternate URL", with no
    quality of service guarantees attached to it.

* Is there code we can use?

http://libtorrent.sourceforge.net is under the MIT license. It may well be a
good start.

Gerv