This is the PeerSim simulation branch for P2PSP. Its purpose is to simulate practical conditions with large sets of clients in order to obtain more knowledge about its behaviour.
To run this simulations you need to download the PeerSim simulator from PeerSim download page.
You can set up your IDE (i.e. Eclipse) to work with PeerSim project as it described here.
Configuration file is located at config/config.txt
.
-
Create a directory:
$ mkdir p2psp-peersim && cd p2psp-peersim
-
Clone a repository:
$ git clone git@github.com:P2PSP/sim.git
-
Download PeerSim simulator engine (and unzip it):
$ wget downloads.sourceforge.net/project/peersim/peersim-1.0.5.zip && unzip peersim-1.0.5.zip
-
Compile source files of P2PSP protocol:
$ javac -cp ./peersim-1.0.5/peersim-1.0.5.jar:./peersim-1.0.5/jep-2.3.0.jar:./peersim-1.0.5/djep-1.0.0.jar ./sim/src/*.java
-
Run simulation:
$ java -cp ./:./peersim-1.0.5/peersim-1.0.5.jar:./peersim-1.0.5/jep-2.3.0.jar:./peersim-1.0.5/djep-1.0.0.jar peersim.Simulator ./sim/config/config.txt