Question: This assignment aims to become familiar with peer to peer ( P 2 P ) networks and having a client act as both client and

This assignment aims to become familiar with peer to peer (P2P) networks and having a client act as both client and server using the same codebase.
Design a program which allows two or more computers to synchronize files across a local area network (LAN). In order to complete the assignment, I am requiring the use of Docker to implement your distributed network which will simulate the networking environment and manage the seperate nodes in this network.
Each Docker contianer will be a seperate instance of your running code. All nodes must be identical in code with the exception of the configuration locations, directory attachments, etc. Essentially, only their Docker config files may differ.
You will be "exchanging" files from one node to the other through the use of sockets, which are Linux and Unix's way of implementing interprocess communication.
Here is an example of the "networking" that I would like to have implemented :
Nodes P1,P2,dotsPn have clients C1,C2,dotsCn installed on each node respectively. F1,F2,dotsFn are sets of files where F1 is the set of files on node P1,F2 is the set of files on node P2, and so forth.
The goal of your program should be the unification of all sets of files, F, so that Pi,CiFj on each client.
Essentially, what I am asking you to do is to create your own mini version of Dropbox; rather, you will be making a program which will run many instances in Docker and each "instance" will act as a node to synchronize all of the
files which one instance "points" to (which may be on a local hard-drive, a network, or anywhere really) with the contents of whatever the other node "points" to.
Since your computer is emulating the "universe" for your running nodes, you can (and should) specify seperate "sync" locations for each node. This can be done by using a Docker Compose config file for your assignment. Docker Compose allows for one file to configure many different Docker nodes all at once. Please use Python or C++ for the main script. Preferably Python.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!