Swminar On Bittorrent

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 19

c   p

.  


   


ž  is a peer-to-peer file sharing protocol used to distribute
large amounts of data. BitTorrent is a protocol (developed by Bram Cohen
in 2001) that enables fast downloading of large files using minimum internet
bandwidth. It costs nothing to use and includes no spyware or pop-up
advertising. Unlike other download methods, Bit Torrent maximizes transfer
speed by gathering pieces of the file and downloading these pieces
simultaneously from people who already have them. This makes the
download process much faster as compared to other protocols especially
for popular and very large files, like videos and television programs. It is
now maintained by Cohen's company BitTorrent,
c   ²


] 
  



 
 



The most common method by which files are transferred on the


Internet is the client-server model. A central server sends the entire file to
each client that requests it -- this is how both http and ftp work. The clients
only speak to the server, and never to each other. The main advantages of
this method are that it's simple to set up, and the files are usually always
available since the servers tend to be dedicated to the task of serving, and
are always on and connected to the Internet. However, this model has a
significant problem with files that are large or very popular, or both.
Namely, it takes a great deal of bandwidth and server resources to
distribute such a file, since the server must transmit the entire file to each
client. Perhaps you may have tried to download a demo of a new game just
released, or CD images of a new Linux distribution, and found that all the
servers report "too many users," or there is a long queue that you have to
wait through. The concept of (  partially addresses this shortcoming
by distributing the load across multiple servers. But it requires a lot of
coordination and effort to set up an efficient network of mirrors, and it's
usually only feasible for the busiest of sites.
c   Ú

Another method of transferring files has become popular recently: the
peer-to-peer network, systems such as Kazaa, eDonkey, Gnutella, Direct
Connect, etc. In most of these networks, ordinary Internet users trade files
by directly connecting one-to-one. The advantage here is that files can be
shared without having access to a proper server, and because of this there
is little accountability for the contents of the files. Hence, these networks
tend to be very popular for illicit files such as music, movies, pirated
software, etc. Typically, a downloader receives a file from a single source,
however the newest version of some clients allow downloading a single file
from multiple sources for higher speeds. The problem discussed above of
popular downloads is somewhat mitigated, because there's a greater
chance that a popular file will be offered by a number of peers. The breadth
of files available tends to be fairly good, though download speeds for
obscure files tend to be low. Another common problem sometimes
associated with these systems is the significant protocol overhead for
passing search queries amongst the peers, and the number of peers that
one can reach is often limited as a result. Partially downloaded files are
usually not available to other peers, although some newer clients may offer
this functionality. Availability is generally dependent on the goodwill of the
users, to the extent that some of these networks have tried to enforce rules
or restrictions regarding send/receive ratios.

Use of the Usenet binary newsgroups is yet another method of file


distribution, one that is substantially different from the other methods. Files
transferred over Usenet are often subject to miniscule windows of
opportunity. Typical retention time of binary news servers are often as low
as 24 hours, and having a posted file available for a week is considered a
long time. However, the Usenet model is relatively efficient, in that the
messages are passed around a large web of peers from one news server
to another, and finally fanned out to the end user from there. Often the end
user connects to a server provided by his or her ISP, resulting in further
bandwidth savings. Usenet is also one of the more anonymous forms of file
sharing, and it too is often used for illicit files of almost any nature. Due to
the nature of NNTP, a file's popularity has little to do with its availability and
hence downloads from Usenet tend to be quite fast regardless of content.
The downsides of this method include a baroque set of rules and
procedures, and requires a certain amount of effort and understanding from
the user. Patience is often required to get a complete file due to the nature
of splitting big files into a huge number of smaller posts. Finally, access to
c   Æ

Usenet often must be purchased due to the extremely high volume of
messages in the binary groups.





A BitTorrent client is any program which implements the BitTorrent
protocol. Each client is capable of preparing, requesting, and transmitting
any type of computer file over a network, using the protocol. A peer is any
computer running an instance of a client. To share a file or group of files, a
peer first creates a "torrent." This is a small file which contains metadata
about the files to be shared, and about the tracker, the computer that
coordinates the file distribution. Peers that want to download the file first
obtain a torrent file for it, and connect to the specified tracker which tells
them from which other peers to download the pieces of the file. Though
both ultimately transfer files over a network, a BitTorrent download differs
from a classic full-file HTTP request in several fundamental ways:
BitTorrent makes many small P2P requests over different TCP
sockets,while web-browsers typically make a single HTTP GET request
over a single TCP socket. BitTorrent downloads in a random or "rarest-first"
approach that ensures high availability, while HTTP downloads in a
contiguous manner. Taken together, BitTorrent achieves much lower cost,
much higher redundancy, and much greater resistance to abuse or "flash
crowds" than a regular HTTP server. However, this protection comes at a
cost: BitTorrent 4.0.4 running under Windows XP downloads take time to
ramp up to full speed because these many peer connections take time to
establish, and it takes time for a node to get sufficient data to become an
effective uploader. As such, a typical BitTorrent download will gradually
ramp up to very high speeds, and then slowly ramp back down toward the
end of the download. This contrasts with an HTTP server that, while more
vulnerable to overload and abuse, ramps up to full speed very quickly and
maintains this speed throughout. In general, BitTorrent's non-contiguous
download methods prevented it from supporting "progressive downloads"
or "streaming playback". But recent comments by Bram Cohen and new
c   g

developments by Red Swoosh suggest that streaming torrent downloads
will soon be commonplace.





















 

Users browse the web to find a torrent of interest, download it, and
open it with a BitTorrent client. The client connects to the tracker(s)
specified in the torrent file, from which it receives a list of peers currently
transferring pieces of the file(s) specified in the torrent. The client connects
to those peers to obtain the various pieces. Such a group of peers
c   •

connected to each other to share a torrent is called a swarm. If the swarm
contains only the initial seeder, the client connects directly to it and begins
to request pieces. As peers enter the swarm, they begin to trade pieces
with one another, instead of downloading directly from the seeder. Clients
incorporate mechanisms to optimize their download and upload rates; for
example they download pieces in a random order, to increase the
opportunity to exchange data, which is only possible if two peers have
different pieces of the file. The effectiveness of this data exchange depends
largely on the policies that clients use to determine to whom to send data.
Clients may prefer to send data to peers that send data back to them (a tit
for tat scheme), which encourages fair trading. But strict policies often
result in suboptimal situations, where newly joined peers are unable to
receive any data (because they don't have any pieces yet to trade
themselves) and two peers with a good connection between them do not
exchange data simply because neither of them wants to take the initiative.
To counter these effects, the official BitTorrent client program uses a
mechanism called unchoking, where the client reserves a portion of its
available bandwidth for sending pieces to random peers (not necessarily
known-good partners, so called preferred peers), in hopes of discovering
even better partners and to ensure that newcomers get a chance to join the
swarm.
Figure 1 shows the client server downloading process of a Bittottent
protocol. Main steps are:

„ Open a Web page and click a link to download a file to the Computer.
„ The Web browser software on the computer (the Ï ) tells the
server (a central computer that holds the Web page and the file user
want to download) to transfer a copy of the file to users computer.
„ The transfer is handled by a ãÏ  (a set of rules) like FTP (File
Transfer Protocol) or HTTP (HyperText Transfer Protocol).


   
   

     



  




   
      
         


   
       

     
c   d


         



 cc

        




    
        
 




 

 






c   {




  

 








c   Õ


  
       


 


Ú ô   ± A computer with a complete copy of a BitTorrent
file (at least one seed computer is necessary for a BitTorrent
download to operate).
Ú ô  ± A group of computers simultaneously sending (uploading)
or receiving (downloading) the same file.
Ú ?ҏ ± A pointer file that directs the computer to the file that wants
to download. It usually includes:
ҏ
× the URL of the tracker
ҏ
× pieces <hash1,hash 2,«.hash n>

× piece length

× name

× length of the file

Ú ÏA server that manages the BitTorrent file-transfer process


and has a complete view of the swarm. It includes information like:
ҏ
× peer cache (IP address, port, peer id)
× state information (completed or downloading)

Ú w ҏ Ï ± are those systems that have some or no chunks of the


file

Ú › ± (seeders or leechers)

Ú Ã    

× Peer-Peer messages use TCP Sockets to communicate


× ҏPeer-Tracker messages use HTTP re-quest / response
× ҏreturns a random list of peers

c   p











 
 


c   pp





   
! 



 



1. Open a Web page and click a link for the file.
c   p²

2. BitTorrent client software communicates with a Ï to find other
computers running BitTorrent that have the complete file (
computers) and those with a portion of the file (peers that are usually
in the process of downloading the file).
3. The tracker identifies the  ? It includes the connected
computers that have all or a portion of the file and is in the process of
sending or receiving it.
4. The tracker helps the client software trade pieces of the file with other
computers in the swarm. A person¶s computer receives multiple
pieces of the file simultaneously.
If the person continue to run the BitTorrent client software after their
download is complete, others can receive .torrent files from person¶s
computer; the person future download rates improve because he/she are
ranked higher in the "tit-for-tat" system (a system used for fair sharing of
data).
Downloading pieces of the file at the same time helps solve a
common problem with other peer-to-peer download methods: Peers upload
at a much slower rate than they download. By downloading multiple pieces
at the same time, the overall speed is greatly improved. The more
computers involved in the swarm, the faster the file transfer occurs
because there are more sources of each piece of the file. For this reason,
BitTorrent is especially useful for large and popular files.



m 






Ú The order in which pieces are selected by different peers is
critical for good performance
Ú If an inefficient policy is used, then peers may end up in a
situation where each has all the identical set of easily available
pieces, and none of the missing ones.
c   pÚ

Ú If the original seed is prematurely taken down, then the file
cannot be completely downloaded. What are ³good policies´?
Ú Random first piece
× initially, a peer has nothing to trade
× important to get a complete piece immediately
× select a random piece of the file and download it
Ú Rarest piece first
× Determine the pieces that are most rare among your
peers and download those first.
× This ensures that the most commonly available pieces
are left till the end to download.
× Rarest first also ensures that a large variety of pieces are
downloaded from the seed.
Ú Endgame Mode
× Near the end, missing pieces are re-quested from every
peer containing them. When the piece arrives, the
pending requests for that piece are cancelled.
× This ensures that a download is not prevented from
completion due to a single peer with a slow transfer rate.
× Some bandwidth is wasted, however in practice, this is
not too much.
Ú Choking
× Choking is a temporary refusal to up-load. It is one of
BitTorrent¶s most powerful ideas to deal with free rid-ers
(those who only download but never upload).
× Given a set of file block requests from its peers, a
BitTorrent node needs to determine which requests to
service and which to ignore
× A peer chooses periodically a set of peers with whom it
opens TCP connections to upload pieces. Only 4
simultaneous connections 3 best up-loaders & 1 random
peer. Peers are chosen for un-choking in a round-robin
fashion .This optimistic un-choking mechanism allows a
new BitTorrent node to receive some file pieces so that it
has a chance to con-tribute back within the swarm.






c   pÆ



m 


The advantages are:
 BitTorrent networking is not a µpublish-subscribe¶ model like Kazaa;
instead, BitTorrent is true peer-peer networking where users do the
actual file serving.
 Torrents enforce 99% quality control by filtering out corrupted and
dummy files, ensuring that downloads contain only what they claim to
contain.
 Torrents actively encourage users to share their complete files, while
punishing users who only download files.
 BitTorrent can achieve download speeds over 1.5 megabits per
second.
 BitTorrent code is open-source, advertising-free, and adware /
spyware-free. This means that no single person profits from
BitTorrent's success.



w  

"


 wÏ   
BitTorrent does not offer its users anonymity. It is possible to obtain
the IP addresses of all current, and possibly previous, participants in a
swarm from the tracker. This may expose users with insecure systems to
attacks.


 
 ã  
BitTorrent is best suited for continuously connected broadband
environments, since dial-up users find it less efficient due to frequent
disconnects and slow download rates.
Ï wÏã 
BitTorrent file sharers, compared to users of client / server
technology, often have little incentive to become seeders after they finish
downloading. The result of this is that torrent swarms gradually die out;
meaning a lower possibility of obtaining older torrents. Some BitTorrent
websites have attempted to address this by recording each user's
c   pg

download and upload ratio for all or just the user to see, and the provision
of access to newer torrent files to people with better ratios.

 w   
There has been much controversy over the use of BitTorrent trackers.
BitTorrent  themselves and do not store copyrighted data, hence
BitTorrent itself is not illegal ± it is the use of it to copy copyrighted material
that contravenes laws in some locations.

  Ï 
In June 2005, BitTorrent, Inc. released version 4.2.0 of the Mainline
BitTorrent client. This release supported "trackerless" torrents, featuring a
DHT implementation which allowed the client to use torrents that do not
have a working BitTorrent tracker. Another idea that has surfaced in Vuze
is that of m  
. This idea is based on the distributed tracker
approach and is used to describe some web resource. Currently, it is used
for instant messaging. It is implemented using a special messaging
protocol and requires an appropriate plugin. Anatomic P2P is another
approach, which uses a decentralized network of nodes that route traffic to
dynamic trackers. Most BitTorrent clients also use Peer exchange (PEX) to
gather peers in addition to trackers and DHT. Peer exchange checks with
known peers to see if they know of any other peers

9  
Web seeding was implemented in 2006 as the ability of BitTorrent
clients to download torrent pieces from an HTTP source in addition to the
swarm. The advantage of this feature is that a site may distribute a torrent
for a particular file or batch of files and make those files available for
download from that same web server; this can simplify seeding and load
balancing greatly once support for this feature is implemented in the
various BitTorrent clients. The latest version of the popular download
manager GetRight supports downloading a file from HTTP, FTP, and
BitTorrent protocols.

~ôô 
A technique called Broadcatching combines RSS with the BitTorrent
protocol to create a content delivery system, further simplifying and
c   p•

automating content distribution. A script would periodically check the feed
for new items, and use them to start the download.

Ï ã  
Since BitTorrent makes up a large proportion of total traffic, some
ISPs have chosen to throttle (slow down) BitTorrent transfers to ensure
network capacity remains available for other uses. For this reason methods
have been developed to disguise BitTorrent traffic in an attempt to thwart
these efforts. Protocol header encrypt (PHE) and Message stream
encryption/Protocol encryption (MSE/PE) are features of some BitTorrent
clients that attempt to make BitTorrent hard to detect and throttle. The
latest official BitTorrent client (v6) support MSE/PE encryption. In
September 2006 it was reported that some software could detect and
throttle BitTorrent traffic masquerading as HTTP traffic.

In general, although encryption can make it difficult to determine ÷ 


is being shared, BitTorrent is vulnerable to traffic analysis. Thus even with
MSE/PE, it may be possible for an ISP to recognize BitTorrent and also to
determine that a system is no longer downloading, only uploading,
information and terminate its connection by injecting TCP RST (reset flag)
packets.

à  Ï 
BitTorrent metadata format proposed by John Hoffman and
implemented by several indexing websites. It allows the use of multiple
trackers per file, so if one tracker fails, others can continue supporting file
transfer. It is implemented in several clients, such as Vuze, BitComet,
BitTornado, KTorrent and Torrent. Trackers are placed in groups, or tiers,
with a tracker randomly chosen from the top tier and tried, moving to the
next tier if all the trackers in the top tier fail.Torrents with multiple trackers
can decrease the time it takes to download a file, but also has a few
consequences:

„ Users have to contact more trackers, leading to more overhead-


traffic.
c   pd

„ Torrents from closed trackers suddenly become downloadable by
non-members, as they can connect to a seed via an open tracker.

Ï
 Ï 
Even with distributed trackers, a third party is still required to find a
specific torrent. This is usually done in the form of a direct hyperlink from
the website of the content owner or through indexing websites like The
Pirate Bay or Torrentz.In May 2007 Cornell University published a paper
proposing a new approach to searching a peer-to-peer network for inexact
strings which could replace the functionality of a central indexing site.










An as-yet (2 February 2008) unimplemented unofficial feature is
Similarity Enhanced Transfer (SET), a technique for improving the speed at
which peer-to-peer file sharing and content distribution systems can share
data. SET, proposed by researchers Pucha, Andersen, and Kaminsky,
works by spotting chunks of identical data in files that are an exact or near
match to the one needed and transferring these data to the client if the
'exact' data are not present. Their experiments suggested that SET will
help greatly with less popular files, but not as much for popular data, where
many peers are already downloading it.

   
c   p{

In 2008 › žÏ ›ã  (›ž›), became the first
public broadcaster in North America to make a full show available for
download using BitTorrent. The Norwegian Broadcasting Corporation
(NRK) have since March 2008 experimented with bittorrent distribution from
this site. Only selected material in which NRK owns all royalties are
published. Responses have been very positive, and NRK is planning to
offer more content. Usage of the protocol accounts for significant Internet
traffic, though the precise amount has proven difficult to measure. There
are numerous BitTorrent clients available for a variety of computing
platforms. According to isoHunt the size of the torrents is currently more
than 1.1 Petabytes.


~





„ The book of bittorrent by Saikat Basu
„ http://bitconjurer.org/BitTorrent
„ www.wikipedia.org
„ www.scribd.com
„ http://en.wikipedia.org/w/index.php?title=BitTorrent&printable=yes











c   pÕ














You might also like