Project

General

Profile

Architecture » History » Version 31

Greg Burri, 10/07/2013 07:12 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
* 
75
76
h4. Depends of
77
78
* PeerManager
79
* NetworkListener
80
81
82 20 Greg Burri
h3. [[RemoteControlManager]] (RCM)
83
 
84 11 Greg Burri
* Manages all connections from remote controllers.
85
* Send periodically the state of the core to the controllers.
86 1 Greg Burri
* Send asynchronous events to the controllers.
87
* Dispatch the controllers commands.
88 31 Greg Burri
89
90
h4. Depends of
91
92
* FileManager
93
* PeerManager
94
* UploadManager
95
* DownloadManager
96
* NetworkListener
97
* ChatSystem
98 11 Greg Burri
99 10 Greg Burri
100 1 Greg Burri
h2. GUI
101 5 Greg Burri
102 23 Greg Burri
!gui_arch.png!
103 5 Greg Burri
104
h2. Common
105
106 25 Greg Burri
Owns a lot of little helper classes, some are listed below.
107
108 1 Greg Burri
* _Global_ : The ultimate messy collection of functions.
109 26 Greg Burri
* _Hash_ : An hash, used mainly to identify something, a peer, a part of a file, etc.
110 25 Greg Burri
* _PersistentData_ : Serialize protocol buffer message into file.
111
* _Settings_ : Settings of an application (Core or GUI). Used as a singleton.
112
* _TransfertRateCalculator_ : Can compute an average value during a period of time for a stream of data.
113
* _ZeroCopyStreamQIODevice_ : To write or read protocol buffer messages to or from a QIODevice.
114 28 Greg Burri
* _Version_ : The current version of D-LAN. Updated right after the release of the current version.
115 25 Greg Burri
116
117 20 Greg Burri
h3. [[LogManager]] (LM)
118 5 Greg Burri
119 7 Greg Burri
* Logs some kind of severity messages
120 5 Greg Burri
* Can store the log in a file
121
* Used by Core and GUI
122 24 Greg Burri
123
h3. [[RemoteCoreController]] (RCC)
124
125
* Controls one local or remote core via a TCP socket.
126 27 Greg Burri
127
128
h2. First draft of the architecture (just for the lulz)
129
130 29 Greg Burri
!aybabtu_archi.png!