140 likes | 156 Views
JSwitchSim is a Java-based network switch simulator developed by the Stanford High-Performance Networking Group. It allows experimentation with algorithms and data structures for networking. It is not a topology simulator like ns2, but can be extended with plugins. JSwitchSim has an object-oriented modular design and supports event-based or sequential time progression. It has a GUI and can be configured through file-based settings. It follows a similar program structure to SIM and includes various components like traffic generation, input queues, fabric, and output queues. Additional plugins can be created to extend its functionality. JSwitchSim can be used for benchmarking and comparison with other simulators like SIM. A demo version is available for testing and future work involves developing more plugins.
E N D
JSwitchSim – Java Switch Simulator Stanford High-Performance Networking Group Paul Tarjan Nick Mckeown
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 – Ordered Queued Events Bernoulli IID 0.5 prob Traffic
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!