Project

General

Profile

Architecture » History » Version 14

Greg Burri, 09/10/2009 10:49 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 4 Greg Burri
h2. Core
6
7 3 Greg Burri
!core_components.png!
8 2 Greg Burri
9 6 Greg Burri
h3. [[FileManager]]
10
11 12 Greg Burri
* Kept up to date a list of shared files.
12
* Cuts file in chunks.
13
* Each chunk has a hash and can be read or write.
14
* Can make fast search with indexed words.
15
* Can make fast search from a hash code.
16
* The directory structure can be browse.
17
* Theses data (files/dirs/chunks/hashes) are persisted to avoid re-hashing.
18 1 Greg Burri
19
20 8 Greg Burri
h3. [[NetworkListener]]
21
22 1 Greg Burri
* Listens for new TCP connections from peers. Forward it to the _PeerManager_.
23
* Listens for new UDP datagrams.
24 12 Greg Burri
* Provides some interfaces to listen some events.
25
** New chat message.
26
** New search result.
27 9 Greg Burri
* Sent periodically an UDP datagram to show its presence.
28 12 Greg Burri
** This message contains the top chunks.
29
** For each chunk the known IP's are gave to the _DownloadManager_.
30 8 Greg Burri
31
32 1 Greg Burri
h3. [[DownloadManager]]
33 8 Greg Burri
34 12 Greg Burri
* Has a download queue with different status.
35 1 Greg Burri
* Has a pool of downloader which will choose a free chunk and :
36 12 Greg Burri
** Ask the chunk's peer source for the hashes if they are unknown.
37
** Download it from a known peer.
38 1 Greg Burri
39 9 Greg Burri
h3. [[UploadManager]]
40 1 Greg Burri
41 9 Greg Burri
* Listens the _PeerManager_ for new upload requests.
42
* Manage a pool of uploaders which will read a chunk from _FileManager_ and send it to the remote peer.
43
44 8 Greg Burri
45
h3. [[PeerManager]]
46 10 Greg Burri
47 12 Greg Burri
* Knows all other peers and different information about them like nick, amount of sharing and speed transfer.
48 10 Greg Burri
* Each peer has a connection (socket) pool.
49
* Treats new messages (unicast) from other peers.
50
51 12 Greg Burri
52 13 Greg Burri
h3. [[RemoteControlManager]]
53 11 Greg Burri
54
* Manages all connections from remote controllers.
55
* Send periodically the state of the core to the controllers.
56 12 Greg Burri
* Send asynchronous events to the controllers.
57 11 Greg Burri
* Dispatch the controllers commands.
58
59 10 Greg Burri
60 1 Greg Burri
h2. GUI
61 5 Greg Burri
62
63
h2. Common
64
65
h3. [[LogManager]]
66
67 7 Greg Burri
* Logs some kind of severity messages
68 5 Greg Burri
* Can store the log in a file
69
* Used by Core and GUI