Git Product home page Git Product logo

bbalaji561 / peertopeer-filesharing Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 977 KB

In this project, you are asked to write a P2P file sharing software similar to BitTorrent. You can complete the project in Java or C/C++. There will be no extra credit for C/C++. BitTorrent is a popular P2P protocol for file distribution. Among its interesting features, you are asked to implement the choking-unchoking mechanism which is one of the most important features of BitTorrent. In the following Protocol Description section, you can read the protocol description, which has been modified a little bit from the original BitTorrent protocol. After reading the protocol description carefully, you must follow the implementation specifics shown in the Implementation Specifics section.

Java 100.00%
java network-programming peer-to-peer client-server multithreading bittorrent-protocol

peertopeer-filesharing's Introduction

PeerToPeer-FileSharing

In this project, a P2P file sharing software similar to BitTorrent is implemented in Java. BitTorrent is a popular P2P protocol for file distribution. Among its interesting features, choking-unchoking mechanism which is one of the most important features of BitTorrent. In the Protocol Description pdf file, you can read the protocol description, which has been modified a little bit from the original BitTorrent protocol. After reading the protocol description carefully, you can follow the implementation specifics shown in the Implementation Specifics section.

Program Steps:

To run the project, prerequisite is the following:

  • Login to the remote machine, copy the source coded, and compile the code: "javac PeerProcess.java".
  • To run PeerProcces in the remote machines, we wrote a wrapper. So if we start the wrapper, all the processes will be started in the remote machines.
  • To connect to the remote machines via our local machines, we need to first generate the keys.

Follow the below to generate the keys:

  1. Run "ssh-keygen" - it will prompt for file name and passphrase, please don't have a passphrase.
  2. Run "ssh-copy-id -i <your_key> @<remote_machine>" - Copy the key to one of your remote machines.
  • Login to all the remote machines using this key once before you start the wrapper using "ssh -i <your_key> @<remote_machine>". This will avoid the fingerprint prompt message once you start the wrapper.
  • Copy the Common.config file, PeerInfo.config file and the actual file to be transferred in the corresponding peer directories under the folder "project/".
  • In the Ssh wrapper file, please change the username to yours, projPath to where you run the program and 'pubKey' to your generated rsakey.
  • To start the wrapper compile the Ssh.java program - "javac Ssh.java", and run the wrapper - "java Ssh".

peertopeer-filesharing's People

Contributors

bbalaji561 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.