WebTorrent: the peer to peer web If you haven't heard of bittorrent already, you're missing out on...

posted 11 April 2003
WebTorrent: the peer to peer web

If you haven't heard of bittorrent already, you're missing out on a good thing. The concept is fairly simple: for large files (like movie files), instead of a download location, people give you a .torrent URL. If nobody else is downloading the file at that time, your torrent-enabled browser (via a plugin) will just download as normal from the server. But if lots of people are downloading it, then the P2P magic kicks in and you download portions of the file from all over the place, from people who have already downloaded those parts. Result: the server never gets overloaded, and everybody gets their file, and really fast. Better still, serving torrent files doesn't require any server software: you can use somebody else's BitTorrent tracker server, and tracker servers are so simple that they can handle absolutely enormous numbers of hits without trouble.

So that's big files. But what about lots of little ones? One of the problems with the nature of the Internet is that while the Internet is distributed, web sites are not: popular sites are subject to the pain of the Slashdot effect and other major events which cause flash crowds and kill the server. Sites try to combat this in a basic way by providing mirror sites and more systematic, commercial technologies like Akamai do something similar. These require significant extra effort in the former, and completely changing how your sites work in the latter. No good. The obvious way to fix this problem with the nature of the web (and only the web, see below) is to distribute it, using P2P technology: enter WebTorrent.

A computer with WebTorrent will access websites by their ordinary URLs. If you want a web page nobody's downloaded recently, then no problem, you just download directly as before. But if lots of people are viewing a website, then P2P magic kicks in again and you start browsing the site using files sent to you from other surfers' browser caches. Hey presto, you have not just a distributed website, but a distributed web: the website itself doesn't need to do anything to enable WebTorrent support, and the more users get WebTorrent the better the system gets. Eventually, Slashdotting becomes a quaint term that nobody remembers the meaning of.

Some technical details: WebTorrent would install itself on your computer as a localized proxy server: that way, you don't have to mess about making dozens of plugins for every type of application that uses HTTP, and if it doesn't work for a particular application (and it won't always) then you can just turn off or ignore the proxy. This proxy will be configured with the addresses of a good set of WebTorrent-compatible tracker servers, which it will consult when it downloads (it can also use them to find the addresses of other tracker servers, as in Gnutella). As with all P2P systems, checksums can be used to make sure you aren't downloading an out of date version of the page you requested.

Sound good to you? Then help me code the damn thing; I don't have time and barely enough coding experience to do it properly. But I've given you the roadmap.

WebTorrent won't always work
This only works if substantial numbers of people are simultaneously downloading exactly the same web content. Pages that have random text, some types of banner ads, etc., will not get the full benefit of WebTorrent. This is where some other features of Web2 come in handy, but in the meantime it's possible to modify pages using IFRAMEs and other such things to ensure that WebTorrent use would be optimized.

Another implication of that is that it wouldn't work for websites that have lots of personalized server-side processing: you can't download your Hotmail or buy gifts on Amazon using WebTorrent, and you wouldn't want to, because you don't want anyone but you having copies of your personal information on their computers. Again, the use of Web2 modularization would help here, but even so there's still a whole lot of static web content out there that would benefit from a WebTorrent universe.

I think this is one of the best ideas I've had in a while. Go implement, somebody. Come on. Don't make me.

0 comment