Architecture » History » Version 12
Greg Burri, 07/30/2009 02:27 PM
1 | 1 | Greg Burri | h1. Architecture |
---|---|---|---|
2 | |||
3 | 5 | Greg Burri | |
4 | 4 | Greg Burri | h2. Core |
5 | |||
6 | 3 | Greg Burri | !core_components.png! |
7 | 2 | Greg Burri | |
8 | 6 | Greg Burri | h3. [[FileManager]] |
9 | |||
10 | 12 | Greg Burri | * Kept up to date a list of shared files. |
11 | * Cuts file in chunks. |
||
12 | * Each chunk has a hash and can be read or write. |
||
13 | * Can make fast search with indexed words. |
||
14 | * Can make fast search from a hash code. |
||
15 | * The directory structure can be browse. |
||
16 | * Theses data (files/dirs/chunks/hashes) are persisted to avoid re-hashing. |
||
17 | 1 | Greg Burri | |
18 | |||
19 | 8 | Greg Burri | h3. [[NetworkListener]] |
20 | |||
21 | 1 | Greg Burri | * Listens for new TCP connections from peers. Forward it to the _PeerManager_. |
22 | * Listens for new UDP datagrams. |
||
23 | 12 | Greg Burri | * Provides some interfaces to listen some events. |
24 | ** New chat message. |
||
25 | ** New search result. |
||
26 | 9 | Greg Burri | * Sent periodically an UDP datagram to show its presence. |
27 | 12 | Greg Burri | ** This message contains the top chunks. |
28 | ** For each chunk the known IP's are gave to the _DownloadManager_. |
||
29 | 8 | Greg Burri | |
30 | |||
31 | 1 | Greg Burri | h3. [[DownloadManager]] |
32 | 8 | Greg Burri | |
33 | 12 | Greg Burri | * Has a download queue with different status. |
34 | 1 | Greg Burri | * Has a pool of downloader which will choose a free chunk and : |
35 | 12 | Greg Burri | ** Ask the chunk's peer source for the hashes if they are unknown. |
36 | ** Download it from a known peer. |
||
37 | 1 | Greg Burri | |
38 | 9 | Greg Burri | h3. [[UploadManager]] |
39 | 1 | Greg Burri | |
40 | 9 | Greg Burri | * Listens the _PeerManager_ for new upload requests. |
41 | * Manage a pool of uploaders which will read a chunk from _FileManager_ and send it to the remote peer. |
||
42 | |||
43 | 8 | Greg Burri | |
44 | h3. [[PeerManager]] |
||
45 | 10 | Greg Burri | |
46 | 12 | Greg Burri | * Knows all other peers and different information about them like nick, amount of sharing and speed transfer. |
47 | 10 | Greg Burri | * Each peer has a connection (socket) pool. |
48 | * Treats new messages (unicast) from other peers. |
||
49 | |||
50 | 12 | Greg Burri | |
51 | 11 | Greg Burri | h2. [[RemoteControlManager]] |
52 | |||
53 | * Manages all connections from remote controllers. |
||
54 | * Send periodically the state of the core to the controllers. |
||
55 | 12 | Greg Burri | * Send asynchronous events to the controllers. |
56 | 11 | Greg Burri | * Dispatch the controllers commands. |
57 | |||
58 | 10 | Greg Burri | |
59 | 1 | Greg Burri | h2. GUI |
60 | 5 | Greg Burri | |
61 | |||
62 | h2. Common |
||
63 | |||
64 | h3. [[LogManager]] |
||
65 | |||
66 | 7 | Greg Burri | * Logs some kind of severity messages |
67 | 5 | Greg Burri | * Can store the log in a file |
68 | * Used by Core and GUI |