Protocol core-core Version 3 » History » Version 20
Greg Burri, 07/08/2009 10:19 AM
1 | 1 | Greg Burri | h1. Protocols |
---|---|---|---|
2 | |||
3 | This page describes the protocols used by Aybabtu for network communication between cores and between core and GUI. |
||
4 | |||
5 | 7 | Greg Burri | h2. Core <-> Core |
6 | 1 | Greg Burri | |
7 | 7 | Greg Burri | see source:protos/network_protocol.proto. |
8 | |||
9 | 8 | Greg Burri | h3. Parameters |
10 | |||
11 | 10 | Greg Burri | Most parameters will be stored as constants in their component. |
12 | |||
13 | 9 | Greg Burri | |_.Name|_.Value |_.Unit|_.Explanation/Comments| |
14 | 19 | Greg Burri | | _IMAliveFrequency_ | 0.1 | [Hz] | The message _IMAlive_ is sent each 10s. | |
15 | 14 | Greg Burri | | _ChunkSize_ | 33554432 | [Byte] | (32 MB) | |
16 | | _LanSpeed_ | 52428800 | [Byte/s] | (50 MB/s) | |
||
17 | 17 | Greg Burri | | _TimeRecheckChunkFactor_ | 4 | - | If the time to download a chunk exceeds _TimeRecheckChunkFactor_ * _ChunkSize_ / _LanSpeed_ the peers are rescanned to choose a better one (better download rate). For example : 4 * 32 / 50 = 2.6 second | |
18 | | _SwitchToAnotherPeerFactor_ | 1.5 | - | During the recheck of the peers to choose a better one the other download rate must be above the current * 1.5. | |
||
19 | | _DownloadRateValidTime_ | 1500 / _LanSpeed_ = 300 s | [s] | (5 min). The download rate of a peer is only valid during this time after its last update. After that its rate is set to the maximum. | |
||
20 | 15 | Greg Burri | | _TimeBetweenChunksUpdate_ | 500 / _LanSpeed_ = 10 s | [s] | Each 10 s a daemon will scan the _NumberOfChunkToUpdate_ first chunks from the first queued downloads to know which peer has which chunk. | |
21 | 20 | Greg Burri | | _NumberOfChunkToUpdate_ | 100 * _LanSpeed_ / _ChunkSize_ = 156 | - | The first 156 hash chunks (3 kB) will by send periodically to each peer. See message _HaveChunks_ in the proto file. | |
22 | 19 | Greg Burri | | _FindTimeout_ | 15 | [s] | A search request is abandoned after 15 seconds from the start of the request. See message _Find_. | |
23 | | _GetHashesTimeout_ | 60 | [s] | Timeout for the message _GetHashes_. | |
||
24 | | _GetChunkTimeout_ | 10 | [s] | Timeout for the message _GetChunk_. | |
||
25 | | _HaveChunksTimeout_ | _TimeBetweenChunksUpdate_ = 10 | [s] | Timeout for the message _HaveChunks_. | |
||
26 | | _GetEntriesTimeout_ | 10 | [s] | Timeout for the message _GetEntries_. | |
||
27 | 8 | Greg Burri | |
28 | 7 | Greg Burri | h2. Core <-> GUI |