Tuesday, 2 November 2010

PeerSim - Basic steps

To use PeerSim in eclipse you should do the follow
1. Download the peerSim. Here you can find the source code.
2. Create a Java project in Eclipse.
File -> New -> Java project
3. Code the project or copy some example of the package of step 1
4. Create a config file.
4.1 Go to Run -> Run configuration ...
4.2 Choose a name for the configuration
4.3 In the main tab, select the project and the class file that contains your Main function (I have used peersim.Simulator)
4.4 Go to the arguments tab. Fill the "program arguments" part with the name of your configuration file. One way is using the complete path with double quote. For example, "/user/Document/config.txt"


  1. Hi,
    i'm working these days on Peersim, i'm using ubuntu 10.10 version as an operating system, i downloaded the peersim and the chord patch for this simulator but white runing the confifure file of chord i have an error. can you help me please to fix it.
    Best regards,

    the error is :
    Bureau/peersim-1.0.5$ java -cp "peersim-1.0.5.jar:jep-2.3.0.jar:djep-1.0.0.jar" peersim.Simulator example/example.cfg
    Simulator: loading configuration
    ConfigProperties: File example/example.cfg loaded.
    Simulator: starting experiment 0 invoking peersim.edsim.EDSimulator
    Random seed: 1234567890
    EDSimulator: resetting
    Network: no node defined, using GeneralNode
    peersim.config.IllegalParameterException: Parameter "protocol.my": Class ChordProtocol not found
    At peersim.config.ConfigContainer.getClazz:606

  2. Sorry, I am not expert on it. You may ask to my teacher. http://www.sics.se/~fatemeh/

  3. Here is a message from Jihen jiji who has couldn't subscribe to my blog, so he wrote me directly. I hope it can help you.

    Hi i'm from tunisia and I'could'nt subscribe in your blog and I want to help you and meriem in runing peersim with chord so
    you have to execute this code :

    C:\chord>java -cp peersim-1.0.5.jar;jep-2.3.0.jar;djep-1.0.0.jar;classes peersim.Simulator config-chord.txt
    into the folder chord that contains the compiled classes of chord(the folder classes): *.class
    if you have no compiled classe, use the ant apache to generate them from the source classes.
    hope you add this answer to help who have this problem, i'm sure from this response.
    best regards

  4. Hi thanks for the basic steps. I am working on a peer to peer project for web trust and discovering trust path and am suppose to use peersim. I dont know where to start can i get any direction from you. thank you

    1. Hi:
      Sorry, I am working with Android now and I can't hardly go into Peersim. You might refer to my teacher for it: http://www.sics.se/~fatemeh/