Project

General

Profile

Actions

Architecture » History » Revision 13

« Previous | Revision 13/32 (diff) | Next »
Greg Burri, 07/30/2009 04:29 PM


Architecture

Core

FileManager

  • Kept up to date a list of shared files.
  • Cuts file in chunks.
  • Each chunk has a hash and can be read or write.
  • Can make fast search with indexed words.
  • Can make fast search from a hash code.
  • The directory structure can be browse.
  • Theses data (files/dirs/chunks/hashes) are persisted to avoid re-hashing.

NetworkListener

  • 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 chunks.
    • For each chunk the known IP's are gave to the DownloadManager.

DownloadManager

  • 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.
    • Download it from a known peer.

UploadManager

  • 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.

PeerManager

  • 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 (unicast) from other peers.

RemoteControlManager

  • 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.

GUI

Common

LogManager

  • Logs some kind of severity messages
  • Can store the log in a file
  • Used by Core and GUI

Updated by Greg Burri over 14 years ago · 13 revisions