An Overlay Network Simulation Framework

Compile Sources

PlanetSim is using now ant build utility. You should first download and install the jakarta ant library.

Get ant from http://jakarta.apache.org/ant/index.html.


In order to install ant you have to set the following environment variables:

set ANT_HOME=d:\apps\ant
set JAVA_HOME=d:\jdk1.4
set PATH=%PATH%;%ANT_HOME%\bin
set CLASSPATH=.;%ANT_HOME%\lib\ant.jar;%ANT_HOME%\lib\jaxp.jar;%ANT_HOME%\lib\parser.jar

Once you have installed ant you can now compile and test the planet library.

In order to compile you only need to execute ant in the bin directory:

>> cd bin

>> ant
It will generate the file p2p.jar in the jars directory.

Install

The only requirement is a Java JDK1.2.X or superior. Our scripts will assume that you already have java and javac in your PATH. 

Configure Files

In each simulation, you must have defined and initialized three config. files :

 

a) Simulator Propierties

# Events
DEFAULT_EVENT_FILE = test_random.txt

# Default simulation steps for any node join or leave
DEFAULT_SIMULATION_STEPS = 2

# Log Level
# 0 --> error
# 1 --> events
# 2 --> node info
# 3 --> message
DEFAULT_LOG_LEVEL = 0

# OUTPUT FILE OF THE SERIALIZABLE STATE
DEFAULT_OUTPUT_FILE = simdata.dat

# For replacing the output file (default=> true)
DEFAULT_REPLACE_OUTPUT_FILE = true

# Default Timer Class
DEFAULT_TIMER = planet.util.timer.SimulationTimerImpl

# Default OverlayProperties implementation class
DEFAULT_OVERLAY_PROPERTIES = planet.chord.ChordProperties

# Queue Size
DEFAULT_QUEUE_SIZE = 160

# Message Process
DEFAULT_MSG_PROCESS = 1000

 

b) Factory Properties

# Properties for NetworkFactory
DEFAULT_NETWORK = planet.generic.commonapi.NetworkImpl

# Properties for ApplicationFactory
DEFAULT_APPLICATION = planet.test.dht.ChordDHTApplication
DEFAULT_IDCLASS = planet.chord.ChordId

# Properties for NodeFactory
DEFAULT_IDFACTORY = planet.generic.commonapi.factory.IdFactoryImpl
DEFAULT_NODECLASS = planet.chord.ChordNode

# Properties for NodeHandleFactory
DEFAULT_NODEHANDLECLASS = planet.generic.commonapi.NodeHandleImpl

# Properties for NetworkFactory
# The IdFactory can read DEFAULT_TOPOLOGY and DEFAULT_SIZE
# to build Ids.
DEFAULT_NODEFACTORY = planet.generic.commonapi.factory.NodeFactoryImpl
#Topology values: Random | Circular | Serialized
DEFAULT_TOPOLOGY = Circular
DEFAULT_SIZE = 100
DEFAULT_K = 32
DEFAULT_SERIALIZEDFILE = simdata.dat

#Properties for MessagePool
DEFAULT_ROUTEMESSAGE = planet.generic.commonapi.RouteMessageImpl

#Properties for EndPointFactory
DEFAULT_ENDPOINT = planet.generic.commonapi.EndPointImpl

c) Overlay Properties  (ex. Chord) 

# Events
DEFAULT_STABILIZE_STEPS = 10

# Events
DEFAULT_FIX_FINGER_STEPS = 5

# Successor List Lenght
DEFAULT_SUCC_LIST_MAX = 16

Test

To test PlanetSim just go to the scripts directory and executes test

 

>> cd bin

>> ant test

 

To see the results, enter to bin directory to find the report web directory

file://PATH_PlanetSim/bin/report/index.html