TRNR - Download and upload rate calculation and notification

Ideas for ADC may be presented here for others to review and point out flaws or further improve the idea.
Forum rules
If you have an account on the wiki, remember to update the ADC Proposals page for new ideas.

http://dcbase.org/wiki/ADC_Proposals_list
Locked
Pretorian
Site Admin
Posts: 214
Joined: 21 Jul 2009, 10:21

TRNR - Download and upload rate calculation and notification

Post by Pretorian » 06 Dec 2010, 18:26

TRNR - Download and upload rate calculation and notification

Description
This extension intend to add download and upload rate calculation. The information is provided by the downloader and uploader to the hub which calculates the rate.

Hubs may decide what to do with the information if only one party support this extension. Clients should always strive to provide accurate information. Hubs will need to keep track of who initiated the CTM/RCM.

This extension adds a new command, 'TRD', to notify the hub of the amount of data downloaded/uploaded.

Signal 'TRNR' in SUP and in the INF's SU field.

The hub should add the field 'TR' to the client's INF indicating the client's new rate.

TRD
TRD cid token bytes

The downloader and uploader should sends TRD command with the CID of the other party, the token from the CTM/RCM and the amount of bytes transferred.

The following fields are named parameters;
[options="autowidth"]
|=====
|FN |Full file name including path in share.
|SI |File total size, in bytes.
|=====

TIGR support
If TIGR is supported, the following fields are accepted as named parameters;
[options="autowidth"]
|=====
|TR |Tiger Tree Hash root, encoded with Base32.
|=====

Example
Client #1 has downloaded 2000 bytes from client #2.
[options="autowidth"]
|=====
|Client #1 to hub |HTRD <cid2> token 2000
|Client #2 to hub |HTRD <cid1> token 2000
|=====

Hub calculates the clients new rates and sends the following INFs (made up rate values);
[options="autowidth"]
|=====
|Hub |BINF <sid1> TR1.2345
|Hub |BINF <sid2> TR5.4321
|=====

Flow84
Newbie
Posts: 6
Joined: 18 Oct 2008, 11:05

Re: ADC Server-Side Transfer Amount Tracking

Post by Flow84 » 06 Dec 2010, 18:41

Actually...
I believe this is possible even in nmdc.
And there is no need for a extension to the protocol.

Stuff needed to make this work:
* A hub that allows scripting/event triggering on commands (For ADC it would be CTM and RTM).
* Account for a bot to connect to hub with (So we can get filelists and searches).
* A week of constant coding (on this) using Flowlib.

Locked