My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
StartersGuide  
This guide contains details on running and setting-up our simulator application.
Updated Apr 20, 2013 by Arkin...@gmail.com

Setting up your environment

In order to utilize the simulator, you 'll need to follow these steps:

  1. Install the latest Eclipse IDE
  2. Install the latest version of Subclipse from the following URL http://subclipse.tigris.org/
  3. Open Eclipse and click File->Import
  4. From the Import window, select "Checkout Projects from SVN"
  5. Create a new project repository with the following URL http://tman-livestreaming.googlecode.com/svn/trunk/ tman-livestreaming-read-only
  6. Checkout the project and save it to your workspace
  7. Download the required JAR files from https://docs.google.com/file/d/0B2DYZ0rziCtjTl8yQnJ3U0tGY1E/edit?usp=sharing and add them to the project's build-path

Running the simulator

Input Parameters

In order to start the simulator you'll need to pass the following parameters as input args to Main.class in this order:

Parameter Description Format
In-Degree Specifies the maximum number of in-bound connections for all participating nodes Numeric
Cyclon View Size Specifies the maximum number of peers that can be present in a node's cyclon view Numeric
T-Man View Size Specifies the maximum number of peers that can be present in a node's tman view Numeric
Cyclon Shuffle Length Specifies the number of nodes to be shuffled during cyclon exchanges Numeric
Non-source Node BW/Quantity+ Specifies the quantity of joining non-source nodes along with their out-degree BW:Quantity (Both numeric)
No. of Rounds++ Specifies the number of rounds that the simulator should carry out Numeric

+Multiple variants of this parameter can be inputted in succession to specify nodes with different out-degrees

++Has no effect when running in Execution Mode (More details in the "Simulation Mode" section)

Scenarios

To run simulations, you'll need to supply a scenario class to the main method. This scenario class contains a list of processes that are run once the simulation starts. These processes comprise of Peer Joins & Peer Fails. You can modify the default scenario class to generate different events as necessary.

Example:

StochasticProcess source = new StochasticProcess()
       eventInterArrivalTime(exponential(mean));
       raise(numOfEvents, Operations.peerJoin2(BW, isSource), uniform(mean))

The above code block shows a stochastic event that joins new peers to the networks. the eventInterArrivalTime function takes a distribution as an argument (in this case an exponential distribution). The raise function's first argument specifies the number of events to be generated. Its second argument is the type of event to be generated, which in our case is the peerJoin event. The 3rd input is a random distribution that governs the initial ID assigned to the joining peer.

As shown, the peerJoin event takes the bandwidth as its first argument, and its second input is a boolean variable that describes whether or not it's a source node.

This is just an example of how to generate a Peer Join process. Other processes could be created with different inter-arrival times and distributions. You can also generate Peer Fail processes to simulate churn scenarios.

For more information on how to use Kompics' Domain Specific Language (DSL) for specifying scenarios, please refer to this link http://kompics.sics.se/trac/wiki/PeerToPeerExperiments

Simulation Mode

You can run the Simulator in different operation modes. The implemented modes are as follows:

  1. Random Simulation mode: This is the default mode, and it allows the simulator to run in a single-thread
  2. Reproducible Simulation mode: Instruments the application such that the simulation runs are deterministic and can be reproducible (necessary for debugging and back-tracing)
  3. Execution Mode: In this mode, the simulation runs live and allows you to constantly monitor its status and interactively generate events

Interface

The Simulation was implemented to output the results to an external logfile (named tman.out). However, when using execution mode, you can monitor the outputs using a Jetty Webserver running on your localhost. You'll be able to view statistics pertaining to your Cyclon/T-Man/Child-parent cluster overlays, as can be seen below:

Screenshot 1

Screenshot 2

You'll also be able to view the current peers and access them to view their statuses, as shown:

Screenshot 3

Powered by Google Project Hosting