You are on page 1of 20

PROJECT REPORT

Submitted By:

Arunabh Nag 061020 th 5 Semester Comp. Sc. And Engg. Apeejay College of Engg., Sohna

Details Of Training :

Project : Observatory Study and Practical Simulation Of Bit-Torrent File Sharing method. Project Co-ordinator : Mr. Aman Sharma H.C.L. INFOSYSTEMS LTD. Location : B-13 & 14, Sector – 3, NOIDA – 201301 U.P., INDIA

Duration : 45 days Commencement Date : June 21st, 2008 Conclusion Date : August 4th, 2008 P.S. Training Completion Certificate attached herewith issued by requisite signatory authority.

TABLE OF CONTENTS

1. Introduction 2. Overview : P2P file sharing. 3. Observatory Study : Bit – Torrent file sharing. 4. Practical Simulation : Bit - Torrent file sharing. 5. Acknowledgement 6. References 7. Ending Note

Introduction :

Recently we have been using a lot of torrents. The main question is the legality of a torrent and the ethical issues involved with downloading torrents and seeding, or uploading, torrents. The torrent community has had a bad reputation, for most torrents are used to transport illegal and pirated material. But for the few people who do not use torrents in this way, the legality views can hinder their projects and plans.

Torrents Save Money Torrents are an ideal solution for any small software company starting out. The reason being is that bandwidth is expensive. A torrent can easily save a small company starting out or even a larger company money by utilizing a system where peers help share the files. The Torrent system is also ideal for Non-Profit organizations to help get their software or files out to their employees for little to no cost all the while having the volunteers be able to help out with their own computer bandwidth. The biggest organization to utilize the BitTorrents would be the Linux community, who offers free open-source operating systems for those who cannot afford Windows and or want more functionality from their computers.

The Ethical Views

Torrents are noted for their bad reputation and due to this, a lot of people will shy away from ever downloading a torrent. For the few companies that choose to use Torrents this will effectively limit their customer base.

Torrents, in itself are not unethical; however, how torrents have been abused by many software pirates is. If you are downloading a torrent to obtain a copy of software, the best way to make sure what we are downloading is not illegal, is to first check the company’s website (if it is hosted on a 3rd party website) and see if the software we are downloading requires to be purchased.

If it does we do have a couple of options. One, we can help out the business by informing them of the torrent. Two we can download the software from that torrent, but be sure to buy a genuine license key. Three, do our own research; talk with the company etc. doing this will save us from having any type of lawsuits for downloading illegal software.

Just remember that not all torrents are bad or good. We must remember to always virus scan what we are downloading and make sure the software we are downloading is legal, if not go straight to the company.

Overview: P2P file sharing

Peer to Peer (P2P) Networks A peer-to-peer network, commonly referred to as P2P is a network of people who share files. i.e. Person to Person trading. In the past there have been many programs and networks that offered Peer-to-Peer file Trading. Perhaps the biggest and oldest file trading network via peer-to-peers is IRC or Internet Chat Relay. IRC to this day is still the largest file trading community on the web. With their major networks such as dalnet, which houses more than 100,000 users makes IRC the ideal spot for file trading. IRC is an advanced way for people to trade files, generally nonnewbies are very familiar with IRC and use IRC constantly. Napster was a Peer-to-Peer network created by Shawn Fawning which was mainly a music trading site. There was one problem with Napster, it was vunerable enough to be shut down. Now Napster is a legitimate pay site while IRC and Bit Torrents remain free. Essentially a Peer-to-Peer network works as such, a person has a file they want to share. They make the file available to a program which then allows users to connect to that person's computer and downloads the file. Once the person who just downloaded this file has it, they now also share this file with all the users of the software and network. That is the essential part of a Peer-to-Peer network. The more people who have the file and are sharing, the better speeds and reliability you have to get a file.

Peer to Peer (P2P) Technology- How it works: Peer to Peer technology lets people share files over a network on the internet. Most people now use what is known as the second generation of P2P, which is unlike its predecessors like such as Napter, the second generation has no centralized server, making it harder for it to shut down.

How first generation P2P services worked: A connection is established by a peer finding another peer to connect to. Each peer exchanges active peer and their addresses. When a connection has been established, the user can then search for files. When a search has been submitted, it connects to all nodes on its connection list. The results are then displayed and a connection is made.

How second generation P2P services worked:

Gnutella2: Hubs are used to quickly search for files, eliminating the original "find peer and search" method. Instead, they store a list of files on all the "Leaves" (A peer) that are connected to it, thus dramatically reducing search time. Advantages: Unlike Napster, if a hub crashes, it's network stays alive. Disadvantages: Doesn't make network any more durable than the first generation of P2P.

FastTrack: Programs such as Kazaa and iMesh use the FastTrack protocol. Normal peers connect to a supernode which acts just like a hub. Supernodes also connect to other

supernodes, allowing search requests to move through the network very quickly. Peers then establish a direct connection to a client after a file has been found. Advantages: Any client can become a supernode. Disadvantages: Corruption of files occur.

Bit Torrent: *.torrent files are used to store information about the file being shared. Once a torrent file is opened, the client connects to the tracker which tells the client where the file is located and what other peers/seeders there are. Bit Torrent works by chunks of small files being transferred (even through multiple connections), while you are downloading. The files are checked for corruption as the download continues. Leechers are people who download and don't upload, and are highly frowned upon on some sites, disallowing them from downloading any further. Advantages: Very fast for popular, new files. Disadvantages: Trackers are unreliable and if it goes down, the file is lost.

EDonkey Network: Edonkey runs on the same principle as first generation P2P, only anybody can become a server. Clients communicate with the server to download files, and random chunks can be downloaded in any order then put together in the end. Advantages: No file corruption, leech penalization. Disadvantages: It can penalize users unfairly.

Observatory Study: Bit – Torrent file sharing

Bit torrent networking is the latest form of internet P2P (peer-topeer) file sharing. Since 2006, Bit torrent sharing has been the most popular means by which web users trade software, music, movies, and digital books across the internet. BitTorrents are very unpopular with the MPAA, the RIAA, and other copyright authorities, but are much beloved by millions of college and university students around the planet. BitTorrents (a term synonymous with "torrents") work by downloading small bits of files from many different web sources at the same time. Torrent downloading is extremely easy to use, and outside of a few torrent search providers, torrents themselves are free of user fees. Torrent networking debuted in 2001. A Python-language programmer, Bram Cohen, created the technology with the intent to share it with everyone. And indeed, its popularity has taken off since 2005. The torrent community is now growing exponentially in 2007. Because torrents screen out dummy and corrupt files, are free of adware/spyware, and achieve amazing download speeds, torrent popularity is growing fast. At its current rate of growth, Bit Torrent networking will become the largest true P2P file-sharing community within the next year.

Unlike most P2P networks, Bit Torrent stands out for 5 major reasons: 1. Bit Torrent networking is NOT a publish-subscribe model like Kazaa; instead, Bit Torrent is true Peer-Peer networking where the users do the actual file serving.

2. Torrents enforce 99% quality control by filtering out corrupted and dummy files, ensuring that downloads contain only what they claim to contain. 3. Torrents actively encourage users to share (“seed”) their complete files, while punishing users who "leech". 4. Bit Torrent can achieve download speeds over 1.5 megabits per second. 5. BitTorrent code is open-source, advertising-free, and adware/spyware-free. This means that no single person profits from BitTorrent's success.

Torrents are a pretty cool way of distributing bandwidth on a download. A torrent is made up of 4 parts: the torrent file, the tracker, and the swarm which is broken in to two classes: leechers and seeders. The torrent file itself contains basic data about the file it's describing, how big is it, where is the tracker, and how to verify that it is complete. When you down load a torrent file it tells you where the tracker is. The tracker is a server who's job it is to keep track of the location of users in the swarm. So when you first connect to a tracker you request the address of some peers in the swarm. The swarm is made up of all the users currently running the torrent. The seeders are those that have already completed the file and are staying in the swarm to provide a base for new users to start downloading the file. The majority of most swarms are made up of leechers who have partial copies of the file. The way the download works is that leechers work together to trade sections of the file with each other so that all leechers eventually end up with a complete copy of the file. The point of the request to seed when you are does is that without seeders in the swarm you run the risk that none of the current leechers will have a section of the file and no one will be able to complete the down load.

:Torrent sharing is about "swarming and tracking", where users download many small bits from many different sources at once. Because this format compensates for bottleneck points, it is actually faster than downloading a large file from a single source.

• •

“Swarming” is about splitting large files into hundreds of smaller “bits”, and then sharing those bits across a “swarm” of dozens of linked users. “Tracking” is when specific servers help swarm users find each other. Swarm members use special Torrent client software to upload, download, and reconstruct the many file bits into complete usable files. Special .torrent text files act as pointers during this whole process, helping users find other users to swarm with, and enforcing quality control on all shared files.

Torrent sharing goes like this: if you share files on BitTorrent, you will be rewarded with increased download speed. Conversely, if you choose to "leech" and not share your files upwards, you will be punished with slow Torrent download speeds. Download speed is controlled by Torrent tracking servers, who monitor all swarm users. If you share, tracker servers will reward you by increasing your alotted swarm bandwidth (sometimes up to 1500 kilobits per second). Similarly, if you leech and limit your upload sharing, tracking servers will choke your download speeds, sometimes to as slow as 1 kilobit per second. Indeed, the "Pay It Forward" philosophy is digitally enforced! Leeches are not welcome in a BitTorrent swarm.

Practical Simulation: Bit - Torrent file sharing
Now we consider the practical application of bit torrent file sharing method on a computer. BitTorrent “swarming” requires six major ingredients. 1. BitTorrent client software (there are dozens of choices, all free to install.) 2. A tracker server (hundreds of them exist on the Web, no cost to use). 3. A .torrent text file that points to the movie/song/file you want to download. 4. A Torrent search engine that helps you find these .torrent text files. 5. A specially-configured Internet connection with port 6881 opened on the server/router to allow Torrent file trading. 6. A working understanding of file management on your PC/Macintosh. You will need to navigate hundreds of folders and filenames to make file sharing work for you.

We have used here the “µtorrent 1.7.7” client. It’s basic components are: 1. Menu Bar: The File, Options n Help menus. 2. Standard Buttons: The Add torrent, Add torrent from URL, Create new torrent, Remove, Start, Pause, Stop, Move up, Move down, RSS downloader and Preferences buttons. 3. Search Bar: A search text box and a drop down list of torrent sources.

4. Category Bar: Torrents are categorized here on the basis of their status. The categories are All(x), Downloading(x), Completed(x), Active(x), Inactive(x) and No Label(x) where x is the number of torrent files in that category. 5. List Area: List of the torrents according to category chosen. 6. Activity Area: Activity of each torrent file shown acc. To the torrent highlighted in list area. The various tabs are General, Peers, Pieces, Files, Speed, Logger. 7. Status Bar: Provides the upload and the download speed.

Below is a screenshot of the “µtorrent” client:

The Torrent download process goes likes this:

1. You use special Torrent search engines to find .torrent text files around the Net. A .torrent text file functions as a special pointer to locate a specific file and the swarm of people currently sharing that file. These .torrent files vary from 15kb to 150kb file size, and are published by serious Torrent sharers around the world. 2. You download the desired .torrent file to your drive (this takes about 5 seconds per .torrent file at cable modem speeds). 3. You open the .torrent file into your Torrent software. Usually, this is as simple as a a double-click on the .torrent file icon, and the client software auto-launches. In other cases, this software will even open the Torrent file for you. 4. The Torrent client software will now talk to a tracker server for 2 to 10 minutes, while it scours the Internet for people to swarm with. Specifically, the client and tracker server will search for other users who have the same exact .torrent file as you. 5. As the tracker locates Torrent users to swarm with, each user will be automatically labeled as either a “leech/peer” or as a “seed” (users who have only part of the target file, versus users who have the complete target file). As you might guess, the more seeds you connect to, the faster your download will be. Commonly, 10 peers/leeches and 3 seeders is a good swarm for downloading a single file. 6. The client software then begins the transfer. As the name “sharing” implies, every transfer will happen in both directions, “down” and “up” (leech and share). *SPEED EXPECTATION: Cable and DSL modem users can expect an average of 250 kilobytes per second, sometimes slower if the swarm is small with less than 2 seeders.

7. Once the transfer is complete, leave your Torrent client software running for at least two hours. This is called "seeding" or "good karma", where you share your complete files to other users. Suggestion: do your downloads just before you go to sleep at night. This way, you will seed your complete files, you will increase your upload/download ratio, and you will have complete downloaded files by the time you wake up!

Creating Torrents:

When we click on the WAND i.e. the button provided for creating torrents, the following window opens.

In order to share files using the Bit Torrent protocol, you will need three things. 1. A tracking server, which coordinates connections among the peers. Because the tracking server is only monitoring connections and not the actual content being shared, the bandwidth required by the tracking server is very minimal. 2. A web server, where you will serve the .torrent file. Because a .torrent file contains only vital information about the file being shared and downloaded, it is usually very small. 3. One seed, at least. A seed is one computer that has the entire contents of the file. If you do not have access or the resources to create and manage your own tracking server and/or web server, you can rely upon the many torrent communities which take care of running a tracking server and web servers for distributing the .torrent metadata file. Once you have arranged for a tracking server and a web server - you will be ready to begin creating and distributing the .torrent file. 1. First, select a file or set of files that you want to share. Remember, a torrent can contain either a single file, or a directory of several files. If your torrent has many files, you do not need to compress them into a .zip or .rar file.

2. Now you can create the torrent file. Run maketorrent. If you are sharing a single file, click the (file) button, otherwise click the (dir) button. In either case a file dialog will appear, and you should select the file/directory that you wish to share.

3. Enter the tracker's announce url in the space provided, or use the drop-down list to select from one of a common list of trackers. Remember, if you use a site's tracker when creating a .torrent file, plan to upload/post the file to that community. You can also add a comment, but it's optional.

4. Select the piece size, or just accept the default value of (auto). In general, the smaller the piece size, the more efficient the BitTorrent download will be, but will result in a larger .torrent file. 256 kB seems to be the most common piece size in use these days, but you can experiment with other settings if you want. Avoid very large piece sizes for small files; likewise avoid small piece sizes for very large files.

5. Upload this .torrent file to a web server. Usually this means going to the web page of the site whose tracker you used and clicking the "Upload torrent" link. The procedure varies from site to site, but it's usually always explained in a FAQ link or forum posting. If you are running your own web server (and have configured it appropriately) then upload the file to your server's public web space, or whatever method you use to put files on your server.

6. Finally, you must seed the file. Until this step, nothing but metadata has been transferred. Seeding is necessary to actually transmit your file to others. Navigate to the page on the web server where your .torrent is posted, click the link, and when the BitTorrent client starts be sure to select the same file/ directory that you used in maketorrent in step 2 above. The client should check the files and verify that they are complete, and then connect to the tracker and begin seeding.

Acknowledgement:

I WOULD ESPECIALLY LIKE TO THANK MY PROJECT CO-ORDINATOR “MR. AMAN SHARMA”, H.C.L. INFOSYSTEMS LTD. WHO HAD BEEN ASSOCIATED WITH THE DEVELOPMENT OF THIS PROJECT AND ALSO FOR THE VALUABLE GUIDANCE IN UNDERTAKING STUDY AND PREPARATION THIS PROJECT IN THE PRESENT FORM. I ALSO OFFER MY PERSONAL GRATITUDE TO MY FRIENDS AND FAMILY MEMBERS AND TO ALL THOSE WHO HELPED AND CO-OPERATED WITH ME WHILE PREPARING THIS PREOJECT. I’VE STRIVED HARD TO PRESENT THIS PROJECT. COMMENTS AND IMPROVEMENTS WILL BE HIGHLY APPRECIATED. THANKING YOU… ARUNABH NAG ROLL NO. 061020 5th SEMESTER C.S.E - A1

REFERENCES:

1. Bit Torrent Peer to Peer Files and Software Definition by Frost on the DENVER COLORADO BLOG by James Worthen.

2. ‘How Bit Torrents Work’ on ‘About.com’ by “Paul Gil”, author of Internet for Beginners Guide.

3. http://www.quartermeg.com – The source for Bit Torrent client Info.

4. How Peer to Peer (P2P) Works by Nigel Wong

Ending Notes
In the end Torrents are not all illegal, although there is a vast community out there that do use torrents illegally, torrents can be considered a viable solution to expensive bandwidth; thus allowing companies, non-profit or profit making, pass along their savings to their customers all the while making access to their files easier. Remember a lot of time and effort go into making movies, games, and software. Give credit where credit is due. Bit Torrents are handy for just about any situation where you need to send files to more than one person. uTorrent's Free Bit Torrent software allows you to create your own bit torrent for sharing. With this awesome free feature from uTorrent you can now share files with 10 people at once and minimize the time and bandwidth it would take to send all 10 files to all 10 people.