Architecture » History » Version 26
Greg Burri, 03/07/2011 09:54 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 | 22 | Greg Burri | h3. [[PeerManager]] (PM) |
23 | 1 | Greg Burri | |
24 | 22 | Greg Burri | * Knows all other peers and different information about them like nick, amount of sharing and speed transfer. |
25 | * Each peer has a connection (socket) pool. |
||
26 | * Treats new messages (TCP) from other peers. |
||
27 | 12 | Greg Burri | |
28 | 22 | Greg Burri | h3. [[UploadManager]] (UM) |
29 | 9 | Greg Burri | |
30 | 22 | Greg Burri | * Listens the _PeerManager_ for new upload requests. |
31 | * Manage a pool of uploaders which will read a chunk from _FileManager_ and send it to the remote peer. |
||
32 | |||
33 | |||
34 | 20 | Greg Burri | h3. [[DownloadManager]] (DM) |
35 | 8 | Greg Burri | |
36 | 12 | Greg Burri | * Has a download queue with different status. |
37 | 1 | Greg Burri | * Has a pool of downloader which will choose a free chunk and : |
38 | 12 | Greg Burri | ** Ask the chunk's peer source for the hashes if they are unknown. |
39 | |||
40 | 1 | Greg Burri | |
41 | 22 | Greg Burri | h3. [[NetworkListener]] (NL) |
42 | 1 | Greg Burri | |
43 | 22 | Greg Burri | * Listens for new TCP connections from peers. Forward it to the _PeerManager_. |
44 | * Listens for new UDP datagrams. |
||
45 | * Provides some interfaces to listen some events. |
||
46 | ** New chat message. |
||
47 | ** New search result. |
||
48 | * Sent periodically an UDP datagram to show its presence. |
||
49 | ** This message contains the top needed chunks given by the _DownloadManager_. |
||
50 | ** For each answer the known IPs associated to a chunk are given to the _DownloadManager_. |
||
51 | ** Download it from a known peer. |
||
52 | 10 | Greg Burri | |
53 | 12 | Greg Burri | |
54 | 20 | Greg Burri | h3. [[RemoteControlManager]] (RCM) |
55 | |||
56 | 11 | Greg Burri | * Manages all connections from remote controllers. |
57 | * Send periodically the state of the core to the controllers. |
||
58 | 12 | Greg Burri | * Send asynchronous events to the controllers. |
59 | 11 | Greg Burri | * Dispatch the controllers commands. |
60 | |||
61 | 10 | Greg Burri | |
62 | 1 | Greg Burri | h2. GUI |
63 | 5 | Greg Burri | |
64 | 23 | Greg Burri | !gui_arch.png! |
65 | 5 | Greg Burri | |
66 | h2. Common |
||
67 | |||
68 | 25 | Greg Burri | Owns a lot of little helper classes, some are listed below. |
69 | |||
70 | 1 | Greg Burri | * _Global_ : The ultimate messy collection of functions. |
71 | 26 | Greg Burri | * _Hash_ : An hash, used mainly to identify something, a peer, a part of a file, etc. |
72 | 25 | Greg Burri | * _PersistentData_ : Serialize protocol buffer message into file. |
73 | * _Settings_ : Settings of an application (Core or GUI). Used as a singleton. |
||
74 | * _TransfertRateCalculator_ : Can compute an average value during a period of time for a stream of data. |
||
75 | * _ZeroCopyStreamQIODevice_ : To write or read protocol buffer messages to or from a QIODevice. |
||
76 | * _Version_ : The current version of Aybabtu. Updated right after the release of the current version. |
||
77 | |||
78 | |||
79 | 20 | Greg Burri | h3. [[LogManager]] (LM) |
80 | 5 | Greg Burri | |
81 | 7 | Greg Burri | * Logs some kind of severity messages |
82 | 5 | Greg Burri | * Can store the log in a file |
83 | * Used by Core and GUI |
||
84 | 24 | Greg Burri | |
85 | h3. [[RemoteCoreController]] (RCC) |
||
86 | |||
87 | * Controls one local or remote core via a TCP socket. |