Segmented downloads and multi-source

In the beginning there were only one part.

In the beginning there were only one source.

Then, after a while, clients started to include features called “segmented downloading” and “multi-source”. The former is required for the latter. So, what are these things?

A segmented download is exactly what it sounds like. When a client without segmented downloading request a file, it requests the file in its entirety. This scheme mean that a file can only be downloaded from one person at any given time. If the user goes offline or breaks the connection, the client will (given additional searching and queuing capabilities) try and continue the download from another user. With segmented downloading powers, the client will not consider a file as one thing; instead it will break the file up in parts (“segments”) and download them, and when they are all downloaded, the multiple parts are put together and you have your file. In the beginning when this feature made its way on DC, which I believe was pioneered by Valknut (then known as DCGUI), the clients would requests parts in an arbitrary position. This technique is quite unsafe, as you can’t verify that you have gotten everything; with TTHs, the parts are downloaded per TTH leaf (“sub TTH”) and can be computed, when they’re downloaded, to be accurate. (Today’s clients with segmented downloads use the TTH-approach, I believe, and the old way is discarded by virtually all clients.)

While the “multi-source” definition may be that a file can be queued from multiple people (the original NMDC client didn’t allow for this), it isn’t in this context. In this context, a multi-source download is a file that is being downloaded, in parts, from multiple users at the same time. The multi-source client can choose the segment randomly and assemble the file parts when the file is complete, or when a larger ‘section’ is complete.

You may have seen a segment capable client when a user has downloaded “the same file” over and over from you. It isn’t that their client like that file very much, it’s just that it’s requesting the file in segments.

Note that there’s not a set amount of leaves for all files, so it’s not “oh, I’ve downloaded three parts, and it’s only two left”. Instead, the amount of leaves are proportional against the size of the file; The larger the files, the more leaves.

Don’t forget that you can make topic suggestions for blog posts in our “Blog Topic Suggestion Box!”

2 Responses to Segmented downloads and multi-source

  1. fearnoevil says:

    How will segmented downloads be implemented?
    Can it be disabled and will it be possible to adjust the size of a part?
    Uploading per 1mb per part like some (&$#%&^) clients do makes the upload log useless.

  2. Fredrik Ullner says:

    DC++ uses the size of the TTH-leaf as the chunk size.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: