Skip to content

zac-sanchez/CDHT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

Task is to build implement a P2P file transfer network using a Circular Distributed Hash Table.

To run the program, open a number of terminals and use the following:

java cdht [peer] [peer_succ1] [peer_succ_2] [MSS] [dropout_prob]

  • peer is an id for this terminal
  • peer_succ1 is an id for a peer in another terminal as the successor to peer 1 in the CHDT.
  • peer_succ2 is an id for a peer in another terminal as the second succesor to peer1 in the CDHT.
  • MSS is the maximum segment size (set to 400).
  • dropout_prob is the probability of a packet loss in transferring the file.

You should make sure the peer numbers create a valid CDHT.

e.g 1 2 3, 2 3 4, 3 4 1, 4 1 2 is valid.

In the terminal you can type the following commands:

  • quit will gracefully remove this peer from the CDHT.
  • request [filenum] will send the file from the CDHT to the current terminal.

About

COMP3331 Computer Networks and Applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages