Thursday, October 27, 2005

Quick BitTorrent / Azureus / etc explanation

OK, this stuff has all been written about to death by people who actually enjoy writing about this sort of thing, so I'm going to give the executive summary for people who don't know what this stuff is. For anyone who wants to learn more, there's a LOT more info out there.

Some definitions: BitTorrent is a method of transferring files, much like FTP. I'll try to give a quick explanation of what makes it so great by comparing it to other transfer methods:

FTP / HTTP - works great for what it is. However, in this case you have many clients downloading data from a single source. Both are reliant on getting the whole file in one shot, otherwise you have to start over again. Not very practical if you want to share your latest home video with the world.

Kazaa / eDonkey / etc - Break files into many small pieces, and work on downloading one piece at a time. This means that, first off, if your download gets botched, you've only lost one small piece of the file, which can be easily recovered. It also means that you can download many different pieces of the same file at the same time. As far as I can remember, Kazaa was the first program to do this (I don't think Napster did it, but now I can't remember - it was a long time ago). These programs also need some centralized servers to keep track of who has what. I won't get into how that works, but it's very clever. I know that Napster was the first program to do _that_, which is what made it so clever. Of course, by the time Napster got the axe, Kazaa was already around to take its place. Kazaa (as far as I know - I don't use it anymore) keeps its own servers, whereas eDonkey / Gnutella rely on people to set up their own servers, which then start keeping track of who has what. That means, if you're looking for something really obscure on one of those networks and can't find it by searching, you can try disconnecting and reconnecting to the network, and you'll reconnect to (hopefully) at least a few different servers.

Finally, BitTorrent - BitTorrent is the next evolution from eDonkey, Kazaa, etc. BitTorrent has all the same ideas as the above, but adds in a couple of key parts. For one thing, there are no centralized servers. Each file you want will have a "tracker", meaning a server that keeps track of who has what pieces of the file (remember, the file is broken into a lot of small pieces). The tracker (and you can have multiple trackers per file) tries to keep track of who is connected and what pieces they have, and instruct everyone accordingly. So, let's say, to make things easy, that a file is only broken into 5 pieces, and there's a lot of people trying to get it. Pieces 1-4 are all over the place, with hundreds of clients having each piece, but piece 5 is only on three or four clients. The tracker will immediately tell a bunch more clients to go get piece 5 (actually, I think the tracker just presents the information and the clients make that decision on their own, but you get the idea), so that it immediately becomes more common and can be downloaded by more clients. This gets rid of a common problem with other clients, where the file is 98-99% done, but you just can't get that last piece; man, I hate that.

BitTorrent also has an egalitarian quality, in that the more you upload, the more you can download. Truthfully you don't have to upload a lot to get a good download rate, but you do have to be able to upload something, otherwise your performance is going to suck. However, this means that whenever you use BitTorrent for anything illegal (i.e. movies, music, etc), you're not just receiving it, you're distributing it, in direct violation of that little warning screen they put at the beginning of the DVD and you can't get fast-forward through.

OK, that all took a lot longer than expected. So, I'll have to cut this short. Later I'll try to explain RSS and how it ties in. Actually, if you fo a google search for "bittorrent rss" then you ought to get a lot of other people's writings about it. I think these things are the wave of the future - they could be used so well to keep people informed and entertained if done properly. Anyway, more about that later.

No comments: