Skip to content

A Linux terminal based Peer-to-Peer file sharing system. Key Area: C++, PThread, Socket programming

Notifications You must be signed in to change notification settings

apurvi96/Mini-Torrent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Mini-Torrent

A peer to peer(P2P) file tansfer protocol to share data over the network where the peers can share or download files amongst the members belonging to same group.

  • Synchronized trackers : Maintain metadata about the peers along with their group details,files shared, port and IP addresses.
  • Parallel Downloading: Support for fast download with multiple pieces coming and downloaded from multiple clients simultaneously.
  • Various modules for client such as create groups, list requests, stop sharing , Show downloads, logout etc.
Key Area: C++, PThread, Socket programming,Multi Threading

Architecture Overview

The system consists of following entities:
SYNCHRONIZED TRACKERS:
  • Maintain information of clients with their files(shared by client) to assist the clients for the communication between peers
  • Trackers should be synchronized i.e all the trackers if online should be in sync with each other
CLIENTS:
  • Client creates an account, register with tracker and login using the user credentials.
  • Client can create groups, fetch list of all groups,request to join groups, leave groups, accept join requests(if owner).
  • Share file across group: Share the filename and SHA1 hash of the complete file as well as piecewise SHA1 with the tracker.
  • Download file:
    1.Retrieve peer information from tracker for the file.
    2.Download file from multiple peers (different pieces of file from different peers - piece selection algorithm) simultaneously and all the files which client downloads will be shareable to other users in the same group.
  • Ensured file integrity from SHA1 comparison
  • Stop sharing all files(Logout)
  • Whenever client logins, all previously shared files before logout automatically goes on sharing mode.

Compile and Run Code

  • g++ -o client client.cpp -lpthread -lcrypto
    ./client
  • g++ -o tracker tracker.cpp -lpthread -lcrypto
    ./tracker

About

A Linux terminal based Peer-to-Peer file sharing system. Key Area: C++, PThread, Socket programming

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages