Menu

Home

Michael Gibson

P2P Tool is a Java API designed to teach how peer-to-peer networks are formed and how nodes on such a network communicate with one another.

It is still a work-in-progress, but new features are being added continuously.

Features

Current version

  • Flooded-request style message sharing
    • Ping
    • Pong
    • ConnectOK
    • Query
    • QueryHit
  • GUI
    • Servent
  • Non-blocking sockets
  • Inheritance use for low-level socket communications
  • See all network messages via a server

In progress

  • GUI
    • Server - graphical network map
    • Document-routing and centralised-directory P2P models

Versions

Latest

0.1.2
Fixed bug where Servents would drop randomly without warning.

Older

0.1.1
Fixed bug where P2PServentGUI.java could not be modified in NetBeans.
0.1
Initial release.

Help

[Documentation]
[Tutorial]

Instructions for demos

Server

  1. In a command prompt/terminal window, start the server with java -jar P2P_Server.jar <port number="">
  2. Keep this running as it will display incoming messages from servents
  3. To finish, press Ctrl+C or close the window

Servent

  1. Double-click on P2P_Servent_GUI.jar to launch the Servent GUI interface. If this does not work, try opening it in a separate command prompt/terminal window with java -jar P2P_Servent_GUI.jar
  2. Under Edit->Settings... enter the server’s address and port number, the name of this servent and its listening port number, maximum number of neighbours (connections) and whether to send all messages via the server. Then press OK
  3. Make sure the server is still running and then click Servent->Connect... The console text area should spit out some messages (if they appear to be broken, it’s something to do with the console’s output buffer) and the Neighbours list will fill up depending if neighbours were found and connected to
  4. Add files to the servent by typing in a file name in the top-right text field and then clicking on Add file. You can also remove files by clicking on a file name in the files list and then pressing Remove file
  5. To find a file, type in the requested file name in the middle text field and then click on Find... If the file has been found, it will appear on the list of files with a comment in the console area showing who it came from
  6. Whilst idling, the console window will display any messages it receives and how it has dealt with them. At any time, it can be cleared by pressing Clear

Bugs

This is still a work in progress, so please contact me if you discover any or if you have any other queries.