bit torrent protocol

22

Upload: ali-habeeb

Post on 21-Nov-2014

730 views

Category:

Technology


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Bit Torrent Protocol
Page 2: Bit Torrent Protocol

CONTENTS INTRODUCTION OTHER FILE TRANSFOR METHODS STRIKING CHARACTERISTICS TERMINOLOGY ARCHITECTURE OF BITORRENT

COMPONENTS OF BITTORRENT SYSTEM

WORKING OF BITTORRENT CONCLUSION

Page 3: Bit Torrent Protocol

Bit torrent is created by bram cohen Transfer of large files using the minimum

internet bandwidth Peer-to-peer file transfer protocol Files are shared by many users Active participation of all users Huge success in the file sharing domain 35% of internet traffic

Introduction

Page 4: Bit Torrent Protocol

Other File Transfer Methods

Typical HTTP file transfer Download Accelerator Plus (DAP) Other Peer to Peer systems

• Kazaa, eDonkey, Direct Connect ….

Page 5: Bit Torrent Protocol

Striking Characteristics

A central server is not needed No single point of failure More the number of users, greater will be the

transfer rate Data available in pieces, not as a single large

file

Page 6: Bit Torrent Protocol

Terminology

Torrent Peer Seed Leecher Swarm Reseed Tracker Share Ratio

Page 7: Bit Torrent Protocol

Architecture of BitTorrent

Page 8: Bit Torrent Protocol

HTTP Peer – Tracker

TCP Peer – Peer

Components of BitTorrent System Metainfo File Data Tracker Peers Client

Page 9: Bit Torrent Protocol

Metainfo file Containes all information about a

torrent File with a .torrent extension Encoding scheme used by bittorrent is

called bencoding Hash of all the pieces are present in

info field of metainfo file

Page 10: Bit Torrent Protocol

Data

Data can be a single file or multiple files contained in a directory

Data is split into many pieces of equal size Each piece is further divided into many

blocks A piece will have a hash, needed for data

integrity check Common piece sizes are 256kb, 512kb and

1mb

Page 11: Bit Torrent Protocol

Tracker

Manages users participating in a torrent Helps peers find each other It is a HTTP service that works on port 6969 Peers request tracker for other peers having

the required pieces Tracker responds with a list of peers that

have the requested piece A tracker can manage many torrents

Page 12: Bit Torrent Protocol
Page 13: Bit Torrent Protocol

Scraping Querying the state of a given torrent Tracker responds with a scrape page

Announce URL : http://example.com/announce

Scrape URL : http://example.com/scrape

Scrape page has the following keys• complete• incomplete• downloaded

Page 14: Bit Torrent Protocol

Peers

Ports 6881 – 6889 are used by peers Peers speak TCP Following are the key strategies used by

peers while sharing files• Random First Piece• Rarest First• Endgame Mode• Peer Distribution• Choking• Optimistic Unchoking

Page 15: Bit Torrent Protocol

Peers perform a handshake to start the communication

Handshaking involves these messages• Character 19 followed by ‘BitTorrent Protocol’• 20 bytes hash of the info field from metainfo file• 20 bytes peer id

Peers start talking to each other They pass a number of messages between

them to send data and control the interactions

Page 16: Bit Torrent Protocol

Client

Executable program running on user’s machine

Co ordinates with OS to perform read write operations

A .torrent file must be opened by the client Peers with same client perform better

Page 17: Bit Torrent Protocol

Working of BitTorrent

1. Seeder generates a torrent file and uploads torrent to a web server.

2. The seeder notifies the tracker that it is sharing the file described in the torrent file.

Page 18: Bit Torrent Protocol

3. A leecher downloads the torrent file from the web server.

4. The leecher connects to the tracker specified in the torrent file.

Page 19: Bit Torrent Protocol

5. The leecher connects to its peers to retrieve pieces of the files.

Page 20: Bit Torrent Protocol

Conclusion

BitTorrent is a popular P2P technology deployed across the Internet.

The protocol has found a niche as a preferred method for the decentralized distribution of large files.

It provides data integrity which ensures that the data will always be genuine and free from flaws.

BitTorrent uses tit for tat exchange to increase cooperation among peers and has developed a reputation for being efficient, scalable, and robust.

Page 21: Bit Torrent Protocol

References:

Cohen, Bram. “Incentives Build Robustness in BitTorrent. 2003.

http://www.bittorrent.com/bittorrentecon.pdf BitTorrent Protocol.

http://www.bittorrent.org/protocol.html

Page 22: Bit Torrent Protocol

THANK YOU