DistSim: Difference between revisions

From
Jump to navigation Jump to search
Line 1: Line 1:
==DistSim==

DistSim is provides tools to define parameters of simulations, exectute them on various hosts in a LAN and collect the results in a database. The parameters, results and references to the code used to perform the simulations are kept in a central MySQL data base, so that little manual organization of data is required and all results of past simulations are easily accessible for comparison. DistSim consists of the following components:
DistSim is provides tools to define parameters of simulations, exectute them on various hosts in a LAN and collect the results in a database. The parameters, results and references to the code used to perform the simulations are kept in a central MySQL data base, so that little manual organization of data is required and all results of past simulations are easily accessible for comparison. DistSim consists of the following components:
[[Image:DistSimArchitecture.png|thumb|architecture]]
[[Image:DistSimArchitecture.png|thumb|architecture]]
Line 10: Line 8:


* The configuration library is also the back end for the '''configuration client''', a swing GUI for defining parameters of simulations.
* The configuration library is also the back end for the '''configuration client''', a swing GUI for defining parameters of simulations.

==HOWTO==

The following guide shows how to set up a simple simulation and touches various aspects of DistSim. It is intended to be used as a starting point for more sophisticated setups.

===Installation===
In order to use DistSim you should set up a MySQL database and provide user accounts for various roles. One role is used for the configuration client, which needs write access to the configuration tables. Another one is used by the wrapper which needs write access to the results tables. You can reconfigure the database connection later, though. So if you just want to test the framework a simple "grant all on simulation to test_user identified by test_pwd" and "grant all on simulation_results to test_user identified by test_pwd" should be enough.
The installation procedure is fairly short and easy. First you have to obtain the latest version of DistSim from the sarforge subversion repository. To do that you should check out https://sarforge.informatik.hu-berlin.de/svn/berlinroofnet/BerlinRoofNet/trunk/simulation/distsim. In the distsim directory you'll find four subdirectories. '''client''' for the configuration client and library, '''or-mapper''' for the object-relational mapping library, and '''wrapper''' for the simulation wrapper. The fourth one, text, contains the actual thesis I wrote about DistSim. In order to make use of DistSim you should at least start one

===defining a package===
In order to actually simulate anything a package with the code to be executed needs to be available. I'm using [[http://jist.ece.cornell.edu/|JiST]] with a simple simulation as example. The Code for the example simulation can be found [[DistSimHelloWorld|here]]. The example has to be copied to the directory src/jist/minisim in the JiST distribution. Then the whole jist distribution needs to be packed as a .zip file. The resulting ''package'' should then be uploaded to a place where it is accessible for the hosts executing the simulations. In the long run an ftp-Server might be a good solution. For now we can just leave it somewhere on the local disc and start the wrapper on the same computer. Let's define the package to be at /home/user/distsim-test.zip.

Revision as of 16:11, 16 February 2007

DistSim is provides tools to define parameters of simulations, exectute them on various hosts in a LAN and collect the results in a database. The parameters, results and references to the code used to perform the simulations are kept in a central MySQL data base, so that little manual organization of data is required and all results of past simulations are easily accessible for comparison. DistSim consists of the following components:

architecture
  • The simulation wrapper is a small program running on the hosts intended to execute the simulations. It regularly checks for changes in the database, fetches new simulation jobs and executes them.
  • The object-relational mapping library is a helper library to simplify storing the results of simulations. It can save (almost) arbitrary java objects into the database using a simple persistence mapping.
  • The configuration library provides routines to define simulations, groups of simulations and studies. It can be used to programmatically create simulations.
  • The configuration library is also the back end for the configuration client, a swing GUI for defining parameters of simulations.

HOWTO

The following guide shows how to set up a simple simulation and touches various aspects of DistSim. It is intended to be used as a starting point for more sophisticated setups.

Installation

In order to use DistSim you should set up a MySQL database and provide user accounts for various roles. One role is used for the configuration client, which needs write access to the configuration tables. Another one is used by the wrapper which needs write access to the results tables. You can reconfigure the database connection later, though. So if you just want to test the framework a simple "grant all on simulation to test_user identified by test_pwd" and "grant all on simulation_results to test_user identified by test_pwd" should be enough. The installation procedure is fairly short and easy. First you have to obtain the latest version of DistSim from the sarforge subversion repository. To do that you should check out https://sarforge.informatik.hu-berlin.de/svn/berlinroofnet/BerlinRoofNet/trunk/simulation/distsim. In the distsim directory you'll find four subdirectories. client for the configuration client and library, or-mapper for the object-relational mapping library, and wrapper for the simulation wrapper. The fourth one, text, contains the actual thesis I wrote about DistSim. In order to make use of DistSim you should at least start one

defining a package

In order to actually simulate anything a package with the code to be executed needs to be available. I'm using [[1]] with a simple simulation as example. The Code for the example simulation can be found here. The example has to be copied to the directory src/jist/minisim in the JiST distribution. Then the whole jist distribution needs to be packed as a .zip file. The resulting package should then be uploaded to a place where it is accessible for the hosts executing the simulations. In the long run an ftp-Server might be a good solution. For now we can just leave it somewhere on the local disc and start the wrapper on the same computer. Let's define the package to be at /home/user/distsim-test.zip.