Architecture » History » Version 21
Greg Burri, 04/13/2010 11:17 AM
| 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 | 20 | Greg Burri | h3. [[NetworkListener]] (NL) |
| 23 | 8 | Greg Burri | |
| 24 | 1 | Greg Burri | * Listens for new TCP connections from peers. Forward it to the _PeerManager_. |
| 25 | * Listens for new UDP datagrams. |
||
| 26 | 12 | Greg Burri | * Provides some interfaces to listen some events. |
| 27 | ** New chat message. |
||
| 28 | ** New search result. |
||
| 29 | 9 | Greg Burri | * Sent periodically an UDP datagram to show its presence. |
| 30 | 18 | Greg Burri | ** This message contains the top needed chunks given by the _DownloadManager_. |
| 31 | ** For each answer the known IPs associated to a chunk are given to the _DownloadManager_. |
||
| 32 | 8 | Greg Burri | |
| 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 | ** Download it from a known peer. |
||
| 40 | 1 | Greg Burri | |
| 41 | 20 | Greg Burri | h3. [[UploadManager]] (UM) |
| 42 | 1 | Greg Burri | |
| 43 | 9 | Greg Burri | * Listens the _PeerManager_ for new upload requests. |
| 44 | * Manage a pool of uploaders which will read a chunk from _FileManager_ and send it to the remote peer. |
||
| 45 | |||
| 46 | 8 | Greg Burri | |
| 47 | 20 | Greg Burri | h3. [[PeerManager]] (PM) |
| 48 | 10 | Greg Burri | |
| 49 | 12 | Greg Burri | * Knows all other peers and different information about them like nick, amount of sharing and speed transfer. |
| 50 | 10 | Greg Burri | * Each peer has a connection (socket) pool. |
| 51 | 19 | Greg Burri | * Treats new messages (TCP) from other peers. |
| 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 | |||
| 65 | h2. Common |
||
| 66 | |||
| 67 | 20 | Greg Burri | h3. [[LogManager]] (LM) |
| 68 | 5 | Greg Burri | |
| 69 | 7 | Greg Burri | * Logs some kind of severity messages |
| 70 | 5 | Greg Burri | * Can store the log in a file |
| 71 | * Used by Core and GUI |