Friday, April 20, 2012

Optional assignment

This assignment will be based on a peer-to-peer protocol invented for the occasion. The so-called "P+2" protocol has been created to be one of the simplest P2P protocols (but not any simpler). You need to read and to understand the protocol specification.

Your job is to create a basic peer that will consist of a server and of a client part. Only the client part interacts with the user.

For helping you out in the developing process I have created both a sample peer and a test tool.

The test program is intended to be run in the same computer as your server code, so you only need to provide the port information.
$ java P2Tester 7777
>>> CONNECT OK
158.42.53.17:7777
158.42.53.17:8899
1.1.1.1:1234

P2P.class
QueryServer.class
ListManagement.class
Peers.class
FileServer.class

>>> READ FROM FILE (first ten bytes): FileServer.class
ca fe ba be 00 00 00 32 00 72

To run the sample peer you have to type:

java -jar P2P.jar folder port known_listserver:port

You can also find interesting the following implementation guide:



p_2

Please ignore any dates mentioned in the documents above, as it belongs to last year's dates.

The day assignments can be shown and presented in the lab is May 9th. Turning it in at a later date is possible but then public show won't be possible. At any rate, the assignment won't be accepted after May 31st.

2 comments:

  1. Álvaro Marco5/06/2012 4:26 PM

    Can we use any programming language or do we have to use java?

    ReplyDelete
  2. Any language is welcome

    ReplyDelete