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