|
StartersGuide
This guide contains details on running and setting-up our simulator application.
Setting up your environmentIn order to utilize the simulator, you 'll need to follow these steps:
Running the simulatorInput ParametersIn order to start the simulator you'll need to pass the following parameters as input args to Main.class in this order:
+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) ScenariosTo 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 ModeYou can run the Simulator in different operation modes. The implemented modes are as follows:
InterfaceThe 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 | |||||||||||||||||||||