Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/02loveslollipop/primitivepeer2peerprotocol
A simple centralized P2P protocol for file exchange
https://github.com/02loveslollipop/primitivepeer2peerprotocol
docker-compose grpc p2p python
Last synced: 6 days ago
JSON representation
A simple centralized P2P protocol for file exchange
- Host: GitHub
- URL: https://github.com/02loveslollipop/primitivepeer2peerprotocol
- Owner: 02loveslollipop
- License: mit
- Created: 2024-09-06T13:36:11.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-22T16:57:31.000Z (3 months ago)
- Last Synced: 2024-12-19T02:10:37.597Z (6 days ago)
- Topics: docker-compose, grpc, p2p, python
- Language: Python
- Homepage:
- Size: 115 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Primitive Peer 2 Peer Protocol (P4)
> A simple peer to peer protocol for file sharing.## Intro
P4 is a simple peer to peer protocol for file sharing. It is designed to be simple and easy to implement. It is a http and gRPC based protocol, with a simple REST API for control and a gRPC for data transfer.## Requirements
1. Python 3.11+
2. mutiple peers (it can be addressed by using Docker or modifying each peer working port)
3. If using with multiple computers, by default, the 8000 is used as the control port and 8001 is used as the data port, so theses ports should be open in the firewall.## Quick Start
Full setup and user guide can be found in the [User manual](https://github.com/02loveslollipop/PrimitivePeer2PeerProtocol/wiki/User-manual)1. Clone the repository
```bash
git clone https://github.com/02loveslollipop/PrimitivePeer2PeerProtocol.git
cd PrimitivePeer2PeerProtocol
```2. (Optional) Create a conda environment
```bash
conda create -n p4 python=3.11
conda activate p4
```3. Install the requirements
```bash
pip install -r requirements.txt
```4. Start the server
```bash
python ./Server/server.py
```5. Start peer server
```bash
python ./Peer/peer.py --server
```6. Start peer client
```bash
python ./Peer/peer.py
```