Architecture » History » Revision 28
Revision 27 (Greg Burri, 03/09/2011 02:08 AM) → Revision 28/32 (Greg Burri, 03/17/2011 12:14 AM)
h1. Architecture 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. For more information, see the BOUML project in the repository : source:/doc/uml h2. Core !core_components.png! h3. [[FileManager]] (FM) * Keep up to date a list of shared files. * Cut file in chunks. * Each chunk has a hash and can be read or write. * Can make fast search with indexed words. * Can return the chunk associated to a given hash code. * The directory structure can be browse. * Theses data (files/dirs/chunks/hashes) are persisted to avoid re-hashing. h3. [[PeerManager]] (PM) * Knows all other peers and different information about them like nick, amount of sharing and speed transfer. * Each peer has a connection (socket) pool. * Treats new messages (TCP) from other peers. h3. [[UploadManager]] (UM) * Listens the _PeerManager_ for new upload requests. * Manage a pool of uploaders which will read a chunk from _FileManager_ and send it to the remote peer. h3. [[DownloadManager]] (DM) * Has a download queue with different status. * Has a pool of downloader which will choose a free chunk and : ** Ask the chunk's peer source for the hashes if they are unknown. h3. [[NetworkListener]] (NL) * Listens for new TCP connections from peers. Forward it to the _PeerManager_. * Listens for new UDP datagrams. * Provides some interfaces to listen some events. ** New chat message. ** New search result. * Sent periodically an UDP datagram to show its presence. ** This message contains the top needed chunks given by the _DownloadManager_. ** For each answer the known IPs associated to a chunk are given to the _DownloadManager_. ** Download it from a known peer. h3. [[RemoteControlManager]] (RCM) * Manages all connections from remote controllers. * Send periodically the state of the core to the controllers. * Send asynchronous events to the controllers. * Dispatch the controllers commands. h2. GUI !gui_arch.png! h2. Common Owns a lot of little helper classes, some are listed below. * _Global_ : The ultimate messy collection of functions. * _Hash_ : An hash, used mainly to identify something, a peer, a part of a file, etc. * _PersistentData_ : Serialize protocol buffer message into file. * _Settings_ : Settings of an application (Core or GUI). Used as a singleton. * _TransfertRateCalculator_ : Can compute an average value during a period of time for a stream of data. * _ZeroCopyStreamQIODevice_ : To write or read protocol buffer messages to or from a QIODevice. * _Version_ : The current version of D-LAN. Aybabtu. Updated right after the release of the current version. h3. [[LogManager]] (LM) * Logs some kind of severity messages * Can store the log in a file * Used by Core and GUI h3. [[RemoteCoreController]] (RCC) * Controls one local or remote core via a TCP socket. h2. First draft of the architecture (just for the lulz) !archi.png! !aybabtu_archi.png!