Koloocheh is a decentralized peer-to-peer file sharing system implemented with the gRPC framework in Python.
To run Koloocheh, follow the following steps:
-
Make sure you have
python3andpipinstalled on your machine. -
Clone the repository:
$ git clone [email protected]:daneshvar-amrollahi/Koloocheh.git $ cd Koloocheh
-
Create a virtual environment in the
.venvdirectory:$ pip install --user virtualenv $ python -m venv .venv
-
Activate the virtual environment:
$ source .venv/bin/activate -
Install the required dependencies:
$ pip install -r requirements.txt
The master should be created exactly once (in the very beginning):
$ python Koloocheh.py masterA new peer can join the network using the following command:
$ python Koloocheh.py peer <ip> <port>A peer can upload a file using the following command:
$ upload <file_name> <file_data>A peer can view its own files using the following command:
$ get_filesA peer can request a file using the following command:
$ download <file_name>The graph representing the whole network can be viewed using the following command:
$ showPlease refer to our wiki at https://github.com/daneshvar-amrollahi/Koloocheh/wiki for further details on how this system works.
