[BitTorrent] Really random?

John Prevost j.prevost at gmail.com
Wed Jul 14 20:08:53 EDT 2004

On Wed, 14 Jul 2004 16:24:08 -0500, jamuraa at base0.net <jamuraa at base0.net> wrote:
> Actually, the standard Python client does do it this way since 3.3
> (and approximately 07/07/2003, I think).  It used to do background
> allocation, but mainline has used the "allocate a piece at a time and
> juggle pieces" way that is described here for a while.

Ahh--you're right.  I looked at Storage.py first, and it it just uses
seeks, but StorageWrapper.py does the juggling you mention.  Still
seems a bit silly and overcomplicated to me, I'm afraid.  :)  I wonder
how this behavior would interact with the proposed Merkle tree hashes
for bt2--in that system, you don't have the hash for each piece to
check (unless you've fetched those hashes from peers and stored them
away), and order matters.  I suppose you could write a mapping table
at the end of the file, though.  (i.e. there's a fixed size "extra"
chunk after all of the pieces, and when you're going to shuffle things
into place you write out a new descriptor as well.  That could go very
very poorly if there's a crash, though.  With the hash-per-piece
method, if meta-information is lost or becomes corrupt, it's not too
hard to recover.  With tree hashes, though, the loss or corruption of
meta-info could be crippling.)


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70

Yahoo! Groups Links

<*> To visit your group on the web, go to:

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

<*> Your use of Yahoo! Groups is subject to:

More information about the BitTorrent mailing list