[bittorrent] partial download

Song Zhang songzhang2008 at gmail.com
Mon Nov 16 16:47:58 EST 2009

I got one question about the piece selection of the mainline BitTorrent.
>From the source code(v3.3 or v4.0.2), once the local peer got HAVE message
from remote peer ( Downloader.py, got_have()), if there are block missing
for the index piece or the piece never downloaded, the peer will request the
index piece.
Does it mean that the piece selection algorithm(rarest first) only play a
small role in the whole piece downloading process ?

from the following, once the peer got a HAVE message, he may download the
index piece.  maybe I am wrong. thanks !!

 if self.downloader.storage.do_I_have_requests(index):
            if not self.choked:
                if not self.interested:
                    self.interested = True

2009/11/15 Arnaud Legout <arnaud.legout at inria.fr>

> Hi,
> it is undoubtedly a poor idea to start with mainline 3.3. Algorithms at
> that time were very different from what they are today.
> I strongly recommend you to work on a 4 or later version. You can also take
> as a basis our instrumented BitTorrent mainline client 4.0.2
> We largely commented the code and made a full and robust instrumentation of
> the client. We have been using this client and improving the instrumentation
> for 4 years, so we are very confident the instrumentation works well.
> Algorithms in mainline 4.0.2 and current uTorrent are very close (it is
> reasonable to consider they are the same in most cases) apart from the
> choking algorithm in seed state. A detailed description of this algorithm
> for the instrumented client can be found in
> http://hal.inria.fr/inria-00137444/en/
> You can find the instrumented client here (bottom of the page)
> http://www-sop.inria.fr/members/Arnaud.Legout/Projects/p2p_cd.html
> Regards,
> Arnaud.
> Song Zhang wrote:
>> Actually, I am trying to modify the code of bittorrent v3.3 to implement
>> the partial download. ( for the experiment of paper )
>> For example, although all the peers are downloading a multifile torrent
>> including file a+b, some of the peers only interested file a, some
>> interested in file b, and others interested in file a+b, peers interested in
>> a only downloading pieces from file a, the same for peers interested in file
>> b. once it got the file a or file b, it will leave.(selfish)
>> I have some problem as the following.
>> 1. each time the remote peer wants to communicate(send data) with local
>> peer, it will send handshake message and bitfield and other message to the
>> local peer although the tcp connection is established already, right ? that
>> is why i can see many bitfield message from one remote peer ?
>> 2. I tried to modify the Downloadery.py, the function of got_have,
>> got_have_bitfield, _request_more
>> the PiecePicker.py, the function of next()
>> 3. I found the pieceselection policy if only useful in the function
>> next(), but there are still possibilities that the local peer get piece from
>> the result of got_have(), right ?
>> 2009/11/14 Cotonéa Loic <l.cotonea at gmail.com <mailto:l.cotonea at gmail.com
>> >>
>>    I'm not completely sure but I think that mainline BitTorrent
>>    development is aborded. The actual enterprise of Bram Cohen
>>    pursues the development of µtorrent and offers a client named
>>    Bittorrent (http://www.bittorrent.com/). I think that this client
>>    is defacto the new client reference.
>>    Bittorrent client supports the partial download.
>>    2009/11/14 Song Zhang <songzhang2008 at gmail.com
>>    <mailto:songzhang2008 at gmail.com>>
>>        Hi,
>>        We are trying to do some experiments for our paper. does
>>        anyone know if there are some versions of mainline BitTorrent
>>        (Bram Cohen) can support partial download.
>>        That is to say, the user only interests one file in a large
>>        torrent, and wants to get it first.
>>        thanks !
>>        _______________________________________________
>>        BitTorrent mailing list
>>        BitTorrent at lists.ibiblio.org <mailto:BitTorrent at lists.ibiblio.org>
>>        http://lists.ibiblio.org/mailman/listinfo/bittorrent
>> ------------------------------------------------------------------------
>> _______________________________________________
>> BitTorrent mailing list
>> BitTorrent at lists.ibiblio.org
>> http://lists.ibiblio.org/mailman/listinfo/bittorrent
> --
> Arnaud Legout, Ph.D.
> INRIA Sophia Antipolis - Planète  Phone :
> 2004 route des lucioles - BP 93   Fax   :
> 06902 Sophia Antipolis CEDEX      E-mail: arnaud.legout at inria.fr
> FRANCE                            Web   :
> http://www-sop.inria.fr/planete/Arnaud.Legout/index.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ibiblio.org/pipermail/bittorrent/attachments/20091116/07c4d4a5/attachment.html 

More information about the BitTorrent mailing list