JSwitchSim – Java Switch Simulator Paul Tarjan Nick Mckeown Stanford High-Performance Networking Group
What is JSwitchSim? ● Network switch simulator ● Not a topology simulator (like ns2) (Although it could be with plugins) ● Allows experimentation with other algorithms and data structures ● Replacement and upgrade for Sim (written in C, by Nick)
What is JSwitchSim? (2) ● Object-oriented modular design ● Easily pluggable ● Either event based (Calendar Queue) or sequential time progression ● Has a GUI or configuration file based (GUI can save to config files)
Program Structure ● Very similar structure to SIM
Program Structure (2) ● Traffic : Generates Traffic ● Splitter : Creates fixed sized cells from packets ● Input Action : Moves cells to the Input Queues ● Input Queues : An n x m matrix of FIFO queues (where n is # of inputs and m is # of outputs) ● Algorithm : Decides how to configure fabric ● Fabric : Moves the data from Input Queues to Output Queues using the Algorithm's output ● Output Queue : m FIFO queues (m is # of outputs) ● Output Action : Takes cells from the Output Queues and disposes of them ● Stats : Records statistics
Code Structure ● Everything implements Event ● Helper Classes DefaultEvent, RepeatableSimEvent ● All plugin classes extend RepeatableSimEvent ● To create plugins extend the corresponding abstract class and implement the abstract method (saving in the corresponding folder) ● For example: Algorithms extend algorithm.Algorithm and implement getMatrix() saved in the folder “algorithm”
Code Structure (2) ● Each run of the program instantiates all new plugins (don't worry about state) ● Main method : common.Main ● Parser : common.Parser ● Gui : common.Gui ● Iterating loop (or queue executer) : common.GlobalData ● All Global Data : common.GlobalData.globaldata
Benchmark – Sequential Events Bernoulli IID 0.5 prob Traffic
Benchmark – Unordered Events Bernoulli IID 0.5 prob Traffic
Benchmark – Ordered Queued Events Bernoulli IID 0.5 prob Traffic
Benchmark – Java vs C
Benchmark – SIM vs JSIM (bare)
Demo ● Just run “java common.Main” or use the jar ● Uses java 1.5
Future Work ● Need tons of plugins to be built ● This is where you can come in!