Giter VIP home page Giter VIP logo

ds-project's Introduction

DS-Project

Peer to peer distributed file sharing application

  • To start open the peertopeer project in netbeans
  • If you want chunking set the chunking flag in Server.java to 0 else set to 1
  • Run the Server.java file
  • Similarly run the Client.java file after entering the server IP (in the Client.java file Main) in same pc as well as some other pc which will be the peers.
  • On connecting with server, each client will get list of services they can access.
  • Peers can send request using the UserRequest.java class dedicated for user input running on separate thread.
  • On entring option(1) the the client will be promted to enter filename to search. So distributed search will be performed and thus if anyone has the file the user will get to know about it.
  • On entering option(3) the client will be promted to enter filename to download. Then the server will broadcast this request to all peers.
  • The peers will search the file in their sharable folder respectively using a already constructed trie-data structure and start their mini server for file transfer on a separate thread (ClientHandler2.java) and send the port for this mini server to server.
  • Server on receiving the message from each client it will send the IPs and Ports of peers having this file and then the requested client can select a peer and start a connection (ClientHandler3.java) and get the file.
  • If the main server crashes for some reason then automatically within 10 seaconds one of the online clients will become the server (Server2.java) or the super peer and all the online peers will be connected to it and thus the system won't crash as a whole.

ds-project's People

Contributors

yash-1998 avatar arindam-modak 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.