The torrent filesand the clients needed to interpret them, are currently the most reliable, sophisticated, and sometimes secure way of exchange of information through .
These allow us to recompose all kinds of files that users have on their computers and are sharing on the network, so that we can download them to enjoy them ourselves.
Due to its increasing use, its usefulness and its questions about legality, copyrightethics and other points to consider, it is interesting to know what exactly these files are, what they consist of, how they are used and what they offer us, and that is what we will see next.
What is a torrent file and what is it for? Definition
A torrent is a file with the capacity to store metadata that can be used by a BitTorrent protocol client. This contains information about a destination file (URLs of various trackers), that is, it shows us what an X file is like but does not have its content as such.
What includes is the location of the parts of that content that we want to get. We can also find, in some of them, additional metadata, called “improvement proposals”.
The structure, encoded yes or yes with UTF-8 (Unicode and ISO encoding) includes:
- Announce: It is the URL of the tracker.
- info: A versatile dictionary with independent keys.
- Yam: A directory is suggested to save the content to be downloaded.
- piece length: Is the weight, in bytes, of each piece.
- Pieces: List of hashes that each piece has (the hashes cause the modifications to be detected, serving to avoid them).
- Length: Weight, in bytes, of the file once shared.
- files: List of dictionaries, one per file (multi-file content, obviously). Each one has, in turn, with:
- Path: List of strings of the names of the subdirectories, the end being the one that gives the true name to the file.
- Length: Again, the number of bytes in the file.
Later, we come across other optional keys such as:
- Announce-list: Will render alternative tracker listings.
- Creation date: It is the date the torrent was created ( format ).
- comment: It is free and allows you to report what you want.
- Created by: How and who created andl.torrent.
- Private: It will indicate if the search for pairs is possible keeping aside the indicated trackers.
Its operation includes, in fact, the division of original content into informational pieces or chunks that are placed on different hosts, without limitation. This enables, among other things, the rapid download of heavy content.
A user, who will be a client in the network, makes a request for content, the torrent information is analyzed to find out where the pieces of the original are and put it back together after downloading.
What is the BitTorrent protocol and how does it work? Definition
This is one of several protocols that are established to enable and maintain a communication in P2P networks. It turns out to be one of the most common and is based on the transfer of (large) files by recomposing their parts, hosted on different hosts. This protocol appears in the year 2001 and has recently been acquired, due to its success, for 140 million dollars.
There are many clients (software) that are based on it and, in turn, it can be used in various OS. This increased when the closure of the well-known website Megauploadchanging the usual way in which the download and/or exchange of files occurs.
This protocol works with .torrent filesbeing its method of operation the one we have already seen: creation of an original file, creation of .torrent, conventional distribution of this, use of nodes to have availability in BitTorrent clients (seeds)content demand by a user (execution of the .torrent from your client), creation of a node by this new receiving user, exchange of the parts with the seed and, having them, with other users who will become receivers.
an interesting aspect It turns out to be the possibility of continuing the download where we left it, doing it in several sessions. This is due precisely to this operation of unloading parts. The client orders the ones you get and detects the ones that are missing, so that he simply has to look for the ones that are not on your computer to continue, without you losing anything.
Structure of a BitTorrent network
The best thing about this type of network found in BitTorrent is that its structure is quite simple. This includes:
- peers: Each of the users that make up the network.
- Leechers: Translated as “leeches”, they are users who are sucking on a file but who do not have it completely, that is, they are downloading it. Disparagingly, this denomination is given to that unsupportive user who downloads content but prevents other users from downloading it from their computer, disabling it.
- Seeders (seeds): These are the users who have the file and from whom, therefore, it is downloaded.
- Trackers: It is the server (tracker) that, even without being implicitly part of the communication process, enables the connection of the peers. It is with this resource that it is possible to know who has the file.
- swarm: The set of users that the server is looking for is called a “swarm”.
- metainfo file: This is static.
The first thing that is essential is to prepare the server:
- The first step isif it’s not already running, run a crawler.
- The next will be to do the same with a conventional.
- It is necessary that in this one a association between the .torrent extensionwhich is the one that will be used in the files, and the application in question.
- Now it will be necessary to generate the .torrent files from the content that will be given and from the tracker.
- Once generated, it will have to be placed on the server.
- After that, it will be necessary to include it, linked, in a file that the user accesses.
- Finally, it will be time to start the downloader of the complete filecalled “origin”.
The operation of the service is given as follows:
- a first user It is done with a .torrent file from a web server (the one that has been included, from servers, in step 6 above).
- This file contains the information of interest.
- The address of the tracker to which we will connect to allow joining the network is also included.
- The file is opened using a client program capable of interpreting the information it contains. These are based on the BitTorrent protocol although some have chosen to include improvements for this.
- One allows communication between the tracker and the peer.
- This consists of a display of pairs and seeds that have the file or its parts and to which we can grab to download it.
- At the same time, this tracker collects information of the new connected pair to have it available to the rest.
- knowing the information, the pair searches for the parts of the desired filecommunicating with others.
- Required, the download process begins on the computer of the user who has just joined the network and has requested content search.
For this to happen, it is taken into account that the rarest pieces of the archive will be downloaded first. This is determined by an algorithm that works with the number of copies that exist of the pieces according to sets of pairs, determining the next pair from which we will suck the content.
Advantage
The positive aspects of BitTorrent and points that can be added to improve it are:
- actual content: The main advantage we have when using this method is to ensure real content, which is what it promises to be, and not another type of file or even malware. This has always been a big problem with other P2P network protocols that allowed the user to continuously download, unknowingly, corrupt or false files.
- DHT Extension: A node retains certain information from its close peers. In this way, even if one falls, a large part of its information will be available among the others, which can be downloaded even when it is out of operation. It is, in a way, decentralizing part of the protocol.
- web seeding: In addition to the model for downloading seeds from other users, there is at least one complete file from which downloads can be made.
- superseeding: This method allows the first seed of a file to be defragmented into a smaller number of seeds, so that there are fewer parts to find, recognize and download and, therefore, the content is available more quickly. On the other hand, the pieces cannot be downloaded together, but any user who gets hold of one must share it first so that the user who has the complete file can pass on the next one; in this way, everyone’s participation is encouraged while driving the transfer of new content.
- Lots of options: The proliferation of this form of file transfer has caused the number of websites that include links to .torrents to multiply, as well as specialized search engines have even appeared to search for (forgive the redundancy) this type of file.
- Blocking of corrupted IPs: A record is kept of the blocks that each IP makes available to the others. When one of them sends too much corrupted content, it is blocked, so that the system is always more or less clean of harmful users.
- Reducing the impact of heavy content distribution: He is credited with significantly facilitating this reduction, letting the servers breathe.
- mobile nodes: The fact of dismembering the contents means that mobile devices can also act as nodes, sharing at least small fragments.
Disadvantages
On the other hand, we have some points that make or could make the user experience not be all the positive that is sought:
- economic model protocol: This makes it possible for a user to download and download without sharing anything or hardly anything (only during the time they stay connected to download what interests them). Another consequence is the possibility of creating false identifiers of the same pair that is dedicated to attacking, serving data only to it. Unfortunately, this protocol is not in the best conditions to deal with malicious clients, although some aspects have been improved as far as possible.
- Unsupportive action: It is very common, as we have already mentioned, the user who moves only for his own interest and, once he downloads the file of his interest, accesses the content available to him and disappears, moving away from the download/upload rate desired to maintain the system. Thus, new content spreads quickly in the first few days but can even die if it falls into the hands of users who do not usually connect to the network often. This attitude is already being corrected with algorithms and thanks to the incorporation of private trackers, which record traffic statistics and expel those who move away, positively, from the value 1 for the rate…