Skip to content

seakr1948/CECS-327-Peer2Peer

Repository files navigation

CECS-327-Peer2Peer

This is a file syncer acrross multiple linux machines. It is a distributed system design, and there is no limit to how many machines can join the network.

Usage

cooler_dropbox.py [-h] [--init_network] [--load] shared_folder server_port client_port

positional arguments:
shared_folder relative path of shared folder
server_port port that listens for request
client_port port that broadcast changes

optional arguments:
-h, --help show this help message and exit
--init_network starts network
--load loads meta file, otherwise init meta file

Overview of design

The architecture of the program was designed by Ruben Bramasco. https://github.com/Rv-ben

Worker Thread

The design relies heavily on having a single worker thread in which all incoming/outgoing communication passes through. The worker thread is responsible in deciding which file the node needs, whether or not it needs to store an incoming file, where to store an incoming file, sending files to other nodes, etc. Every decision of the overall node is made by the worker thread, including which nodes are allowed to join the network.

Server Thread

The server thread is responsible for recieving request/files and forwarding them to the worker thread via a buffer in the form of a Queue.

Watcher Thread

The watcher thread is responsible for watching file changes on the repository and forwarding those updates to the worker thread. Where the worker thread will decide whether or not it needs to propagate the updates throughout the network.

A helpful diagram

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages