{"id":16328229,"url":"https://github.com/robertianclarkson/p2p-decentralized-network","last_synced_at":"2026-04-27T08:32:25.246Z","repository":{"id":111509279,"uuid":"307269548","full_name":"robertIanClarkson/P2P-Decentralized-Network","owner":"robertIanClarkson","description":"A lite version of Peer-to-peer software. Developed as a team remotely. End goal was to send a large file from peer to peer using BitTorrent protocol. Uses both UDP and TCP. Excellent example of using OOP to solve a complex issue with many moving parts.","archived":false,"fork":false,"pushed_at":"2021-01-29T05:52:22.000Z","size":27606,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-15T03:42:56.112Z","etag":null,"topics":["linux","p2p","p2p-network","python","python3","unix"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robertIanClarkson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-26T05:25:09.000Z","updated_at":"2024-11-18T18:09:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"03c0383e-6e86-4705-a86b-fce367eb1351","html_url":"https://github.com/robertIanClarkson/P2P-Decentralized-Network","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/robertIanClarkson/P2P-Decentralized-Network","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertIanClarkson%2FP2P-Decentralized-Network","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertIanClarkson%2FP2P-Decentralized-Network/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertIanClarkson%2FP2P-Decentralized-Network/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertIanClarkson%2FP2P-Decentralized-Network/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertIanClarkson","download_url":"https://codeload.github.com/robertIanClarkson/P2P-Decentralized-Network/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertIanClarkson%2FP2P-Decentralized-Network/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32329463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linux","p2p","p2p-network","python","python3","unix"],"created_at":"2024-10-10T23:14:05.609Z","updated_at":"2026-04-27T08:32:25.192Z","avatar_url":"https://github.com/robertIanClarkson.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# P2P Decentralized Network with BitTorrent Protocol\n\nContributors:\n\n* Ramy Fekry\n* Robert Clarkson\n* William Lew\n* Benjamin Lewis\n* John Freirez\n\n# Recording\n* file: `screen_recording.mp4`\n* link: https://youtu.be/iH-XQL5xXY8\n\n# Project Description:\n* This project was an Implementation of a BitTorrent P2P file sharing network protocol. We established connection using a UDP socket between the Trackers, then used TCP sockets to communicate between other Peers to upload and download files. We implemented a file manager to support the uploading and downloading process by arranging fragmented data. The file manager breaks down the file as blocks/pieces of data that's being transferred between peers, then reconstructs the blocks/pieces at the destination. \n\nEach Peer has a Tracker, Client, Server, Torrent, Message, Downloader, FileManger, and Uploader.\n\n# Libraries Used (To run this program, these libraries must be installed):\n* time  ( to slow down the network for debugging )\n* shutil  ( to move file to another directory )\n* htbps   ( to show the progress bar uploading )\n* socket ( to send UDP messages as well as create a persistant connection )\n* pickle ( to encode and decode data sent through TCP )\n* os ( for file IO )\n* threading ( to move processes off the main thread )\n* hashlib ( to hash pointers \u0026 torrent info )\n* bitarray ( to create \u0026 modify bitfields )\n* uuid ( to generate a unique id for each peer with a low chance of collision )\n* bencodepy ( to encode \u0026 decode UDP messages )\n* math\n* builtins\n\n# Python version and compatibility issues:\n* Python version 3.8, \"anything lower than 3.8 might cause an error\" \n\n# How to run\n* To properly test and run you must have two different machines/computers on the same local network.\n* Both will have to run `peer.py`, 1 after the other.\n\n```python\npython peer.py\n```\n* please check the video recording:\n  * file: `screen_recording.mp4`\n  * Link: https://youtu.be/iH-XQL5xXY8\n\n# Challenges \n\n* Needs multiple machine to properly test, weren't able to test with just one, even tried to use a VM to test but still no luck we needed a different machine.\n* While one team member had access to 2 computers, no team member had access to 3 computers. Therefore, the team was unable to test properly with 3 peers connected.\n* To complete this project we broke the the project into it's major components and distributed them amongst members.\n* BitTorrent implementation was difficult to grasp. Therefore, to make progress the team took a few liberties to implement certain functionalities in their own unique way. While this may break from the BitTorrent protocol it did strengthen each member's grasp of P2P.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertianclarkson%2Fp2p-decentralized-network","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertianclarkson%2Fp2p-decentralized-network","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertianclarkson%2Fp2p-decentralized-network/lists"}