Skip to content

daneshvar-amrollahi/Koloocheh

Repository files navigation

Koloocheh

Koloocheh

Koloocheh is a decentralized peer-to-peer file sharing system implemented with the gRPC framework in Python.

Installation

To run Koloocheh, follow the following steps:

  1. Make sure you have python3 and pip installed on your machine.

  2. Clone the repository:

    $ git clone git@github.com:daneshvar-amrollahi/Koloocheh.git
    $ cd Koloocheh
  3. Create a virtual environment in the .venv directory:

    $ pip install --user virtualenv
    $ python -m venv .venv
  4. Activate the virtual environment:

    $ source .venv/bin/activate
  5. Install the required dependencies:

    $ pip install -r requirements.txt

How to run?

Master

The master should be created exactly once (in the very beginning):

$ python Koloocheh.py master

Peer

A new peer can join the network using the following command:

$ python Koloocheh.py peer <ip> <port>

Supported Commands for Peer

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_files

A peer can request a file using the following command:

$ download <file_name>

Supported Commands for Master

The graph representing the whole network can be viewed using the following command:

$ show

Documentation

Please refer to our wiki at https://github.com/daneshvar-amrollahi/Koloocheh/wiki for further details on how this system works.

Contributors

About

A peer-to-peer file sharing system implemented using the gRPC framework in Python.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published