Architecture » History » Version 30
Greg Burri, 06/04/2012 02:40 PM
1 | 1 | Greg Burri | h1. Architecture |
---|---|---|---|
2 | |||
3 | 14 | Greg Burri | This page shows the architecture with two component diagrams, one for the Core and one for the GUI. The responsibilities of each component are then listed. |
4 | 5 | Greg Burri | |
5 | 15 | Greg Burri | For more information, see the BOUML project in the repository : source:/doc/uml |
6 | |||
7 | 4 | Greg Burri | h2. Core |
8 | |||
9 | 3 | Greg Burri | !core_components.png! |
10 | 2 | Greg Burri | |
11 | 20 | Greg Burri | h3. [[FileManager]] (FM) |
12 | 6 | Greg Burri | |
13 | 21 | Greg Burri | * Keep up to date a list of shared files. |
14 | * Cut file in chunks. |
||
15 | 12 | Greg Burri | * Each chunk has a hash and can be read or write. |
16 | * Can make fast search with indexed words. |
||
17 | 17 | Greg Burri | * Can return the chunk associated to a given hash code. |
18 | 12 | Greg Burri | * The directory structure can be browse. |
19 | * Theses data (files/dirs/chunks/hashes) are persisted to avoid re-hashing. |
||
20 | 1 | Greg Burri | |
21 | 22 | Greg Burri | h3. [[PeerManager]] (PM) |
22 | 1 | Greg Burri | |
23 | 22 | Greg Burri | * Knows all other peers and different information about them like nick, amount of sharing and speed transfer. |
24 | 1 | Greg Burri | * Each peer has a connection (socket) pool. |
25 | 30 | Greg Burri | * Can communicate with each peer (send or receive data). |
26 | 12 | Greg Burri | |
27 | 22 | Greg Burri | h3. [[UploadManager]] (UM) |
28 | 9 | Greg Burri | |
29 | 22 | Greg Burri | * Listens the _PeerManager_ for new upload requests. |
30 | * Manage a pool of uploaders which will read a chunk from _FileManager_ and send it to the remote peer. |
||
31 | |||
32 | |||
33 | 20 | Greg Burri | h3. [[DownloadManager]] (DM) |
34 | 8 | Greg Burri | |
35 | 12 | Greg Burri | * Has a download queue with different status. |
36 | 1 | Greg Burri | * Has a pool of downloader which will choose a free chunk and : |
37 | 12 | Greg Burri | ** Ask the chunk's peer source for the hashes if they are unknown. |
38 | |||
39 | 1 | Greg Burri | |
40 | 22 | Greg Burri | h3. [[NetworkListener]] (NL) |
41 | 1 | Greg Burri | |
42 | 22 | Greg Burri | * Listens for new TCP connections from peers. Forward it to the _PeerManager_. |
43 | * Listens for new UDP datagrams. |
||
44 | * Provides some interfaces to listen some events. |
||
45 | ** New chat message. |
||
46 | ** New search result. |
||
47 | * Sent periodically an UDP datagram to show its presence. |
||
48 | ** This message contains the top needed chunks given by the _DownloadManager_. |
||
49 | ** For each answer the known IPs associated to a chunk are given to the _DownloadManager_. |
||
50 | ** Download it from a known peer. |
||
51 | 10 | Greg Burri | |
52 | 12 | Greg Burri | |
53 | 20 | Greg Burri | h3. [[RemoteControlManager]] (RCM) |
54 | |||
55 | 11 | Greg Burri | * Manages all connections from remote controllers. |
56 | * Send periodically the state of the core to the controllers. |
||
57 | 12 | Greg Burri | * Send asynchronous events to the controllers. |
58 | 11 | Greg Burri | * Dispatch the controllers commands. |
59 | |||
60 | 10 | Greg Burri | |
61 | 1 | Greg Burri | h2. GUI |
62 | 5 | Greg Burri | |
63 | 23 | Greg Burri | !gui_arch.png! |
64 | 5 | Greg Burri | |
65 | h2. Common |
||
66 | |||
67 | 25 | Greg Burri | Owns a lot of little helper classes, some are listed below. |
68 | |||
69 | 1 | Greg Burri | * _Global_ : The ultimate messy collection of functions. |
70 | 26 | Greg Burri | * _Hash_ : An hash, used mainly to identify something, a peer, a part of a file, etc. |
71 | 25 | Greg Burri | * _PersistentData_ : Serialize protocol buffer message into file. |
72 | * _Settings_ : Settings of an application (Core or GUI). Used as a singleton. |
||
73 | * _TransfertRateCalculator_ : Can compute an average value during a period of time for a stream of data. |
||
74 | * _ZeroCopyStreamQIODevice_ : To write or read protocol buffer messages to or from a QIODevice. |
||
75 | 28 | Greg Burri | * _Version_ : The current version of D-LAN. Updated right after the release of the current version. |
76 | 25 | Greg Burri | |
77 | |||
78 | 20 | Greg Burri | h3. [[LogManager]] (LM) |
79 | 5 | Greg Burri | |
80 | 7 | Greg Burri | * Logs some kind of severity messages |
81 | 5 | Greg Burri | * Can store the log in a file |
82 | * Used by Core and GUI |
||
83 | 24 | Greg Burri | |
84 | h3. [[RemoteCoreController]] (RCC) |
||
85 | |||
86 | * Controls one local or remote core via a TCP socket. |
||
87 | 27 | Greg Burri | |
88 | |||
89 | h2. First draft of the architecture (just for the lulz) |
||
90 | |||
91 | 29 | Greg Burri | !aybabtu_archi.png! |