Skip to content

P2P system that allows the transfer of gigantic video files (more than 1 GB) between peers, intermediated by a centralized server, using TCP and UDP as transport layer protocol. The system will work in a similar way (but very reduced) to the Napster system

Notifications You must be signed in to change notification settings

lucasMontagnani/ProjetoNapster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

ProjetoNapster

P2P system that allows the transfer of gigantic video files (more than 1 GB) between peers, intermediated by a centralized server, using TCP and UDP as transport layer protocol. The system will work in a similar way (but very reduced) to the Napster system

💻 Description

The system will consist of 1 server (with known IP and port) and many peers. the peer acts both as a provider of information (in this case files) and as a receiver from them. Initially, the server will be available to receive requests from peers. When one PeerX enters the system, it must communicate its information to the server. The server will receive information and store it for future reference. When a PeerY wants to download a video, you must send a request with the file name to the server. The server will look up the name and respond to PeerY with a list of peers that contain it. O PeerY will receive the list from the server and choose one of the peers from the list (let's assume that the chosen is PeerZ). Next, PeerY will request the file for PeerZ, who can accept the request by sending the file, or reject the request. Finally, when PeerY download the file into a folder, the person can go to the folder and view it using a external playback software such as VLC.

⚙️ Features (SERVER)

  • Simultaneously receives and responds (with threads) to peer requests
  • JOIN request
  • LEAVE request
  • SEARCH request
  • Requisição UPDATE
  • Requisição ALIVE
  • Requisição UPDATE

⚙️ Features (PEER)

  • Simultaneously receives and responds (with threads) to requests from the server and other peers
  • Sends a JOIN request to the server via UDP
  • Send a LEAVE request to the server via UDP
  • Sends an UPDATE request to the server via UDP
  • Send an ALIVE_OK response to the server via UDP
  • Sends a SEARCH request to the server via UDP
  • Send a DOWNLOAD request to another peer via TCP

🚀 Installation and Prerequisites

This repository contains just Java class that can be compiled and run using JDK 1.8 or later. Before running the class, it is necessary to download and import the GSON library, which is used to serialize and deserialize Java objects to JSON.

## Prerequisites - [x] JDK 1.8 or later installed on your machine - [x] GSON library downloaded and imported into your project ## Installation To run follow these steps:
  1. Clone the repository to your local machine
  2. Open the project in your preferred IDE
  3. Download the GSON library from the official website
  4. Import the GSON library into your project
  5. Compile and run the Java class

🛠 Technologies

  • Java Language
  • A compatible IDE is recommended, such as eclipse for example

About

P2P system that allows the transfer of gigantic video files (more than 1 GB) between peers, intermediated by a centralized server, using TCP and UDP as transport layer protocol. The system will work in a similar way (but very reduced) to the Napster system

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages