[BitTorrent] A few random questions

John Prevost j.prevost at gmail.com
Fri Jul 30 16:11:11 EDT 2004


On Fri, 30 Jul 2004 20:01:52 -0000, shad0wmatt3r <mgp at ucla.edu> wrote:
> Second, here are some things I couuldn't find in the BitTorrent
> protocol specification. These questions are more to satisfy my own
> curiosity than anything...

> a. Can a peer request multiple pieces from another peer at a time, or
> can it only request a new piece once the current piece has finished
> downloading?

Yes, absolutely.  This pipelining is important to the protocol.  Most
clients send some specific number of requests ahead of time.  Remember
that when you're choked, all outstanding requests are dropped on the
floor.

> b. If a peer can request multiple pieces at a time, is there proper
> etiquette (or some limit) for the number of outstanding pieces you can
> request, or have queued for sending at the other peer?

It varies.  I think that strictly speaking there's no limit--but if
you wanted to protect yourself from an attacker trying to blow up your
queue, you could just set an upper limit and if you ever get sent more
than that, you immediately choke that peer (resulting in all requests
being dropped.)

> c. Can a peer request multiple piece blocks (err, intra-piece pieces)
> from another peer at a time, or not (similar question to a)?

If you mean "can a peer request the same block from multiple peers at
once?" the answer is yes: this is used in end-game mode, actually. 
THe alternative question "can different blocks in the same piece be
requested from different peers" is also absolutely yes.  If it's not
prohibited, you can do it if you want to.

> d. Do clients hard-code the size of a piece block, or scale it
> proportionally with the piece size?

I *believe* that most clients use a hard-coded size for piece-part.  I
may be mistaken, however.  I know that in the past, Azureus had code
to use a larger request size for larger pieces, but I believe that was
removed.

The only constraint here for a client author is that there's an upper
limit for the size of a request: anything bigger than a certain size,
and your peer is likely to drop you like a ticking package.

You might also want to look at:
http://wiki.theory.org/index.php/BitTorrentSpecification

which addresses some finer points of the protocol that the official
spec glosses over, and also discusses some of the elaborations that
have been made since the protocol's release.

John.


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/dkFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/BitTorrent/

<*> To unsubscribe from this group, send an email to:
    BitTorrent-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



More information about the BitTorrent mailing list