RMIT Logo

P2P Application Guide

Introduction Setup Peer Server Centralised DHT Presentation Architecture-Basic Architecture-Operation

Peer

The P2P Peer program can be run in two different modes: centralized (in order to utilize the chat function) or DHT (to enable the ability to share files).

Client screenshot 1.

When the Peer program is run in the chat mode, users will have to input a server address and port and (optionally) a presentation server address and port. A request to join the Chat network will be forwarded to the server. Once this request is approved by the server (ensuring that the username is not already taken), the new user is added to the peer list which is then redistributed to every node in the network.

Once this happens, the chat interface will appear on the screen. Users can double click on users in the peer list to open up a chat tab to begin messaging that particular user.

Client screenshot 2.

When the Peer program is run in the file sharing mode, users will not have to input a server address and port (as this solution aims to remove the need for a server) and instead will have the option of inputting the address and port of any peer currently in a DHT network if they wish to join that particular Chord ring. Alternatively, if a user is beginning their own DHT network, they can click the appropriate check box and no connection details will have to be added.

As more users join and leave an existing Chord network, the older nodes will have their finger tables, predecessor lists and successor lists updated constantly to accommodate for these new additions and removals. This ensures that upload and download requests are forwarded efficiently and correctly. Additionally, nodes will transfer files that no longer belong to them as new nodes are added to the network. Nodes that leave the network due to the program terminating unnaturally are also accounted for as each node's successor checks it's predecessor for life regularly to ensure that no undetected node removals have occurred .

Client screenshot 3. Client screenshot 4.

Uploads to the Chord ring can be initiated by switching to the Upload tab and clicking the Select File to choose the desired upload in a file chooser interface. Once a file has been selected, it can be uploaded by clicking the Upload button. These files can then be downloaded from the Chord ring by switching to the Download tab. The name of the desired file can then be typed into the file name text box and the Download button can be clicked.

Client screenshot 5.

At the bottom of the window, the predecessor list, successor list, finger table and file list will all be displayed and updated as needed. When a download or upload is initiated by a user, the node that the local Peer program forwarded the initial request to will be highlighted in a different colour.

Client screenshot 6. Client screenshot 7.