SIMULATION PACKAGE

To make the construction of simulations easier, we created few file readers in the
$GRIDSIM/examples/DataGridExample/example4 directory.
Hence, it is possible to design and run a simulation without any programming, only by defining a set of configuration files.

To run the simulation, type the following in the command line:

cd $GRIDSIM/examples/DataGridExample
javac -classpath $GRIDSIM/jars/gridsim.jar:. DataGridSim.java
java -cp $GRIDSIM/jars/gridsim.jar:. DataGridSim parameters.txt


EXAMPLE

To demonstrate the functionality of this package we construct the same topology as in the "Getting started" example.

Parameters configuration file

This file is  the main configuration file, which is passed as a parameter to the  gridsim.datagrid.simulation,Sim class.
In this file we describe which files describe our experiment, how many users will be present in the simulation and on which router the Top replica catalogue will be connected to. We also define whether each resource has its own replica catalogue or not.
Warning: the number of users has to be the same as the actual number of users in the user configuration file.

Example:
numUsers=1

files=files.txt
resources=resources.txt
network=network.txt
users=users.txt
topRCrouter=router1
useLocalRC=false

Files configuration file

Format of the file
filename1 size
filename2 size
.
.

filenameN size


Description of parameters

filename1
............ the name of the file - arbitrary string (no spaces)
size ...................... the size of the file in MB

Example:

testFile1 10
testFile2 10
fileM 10
fileK 10
fileH 10
fileD 10
fileF 1

Resources configuration file 

Format of the file
Resource1_name storage_size bandwidth router_name list_of_containing_files
Resource2_name storage_size bandwidth router_name list_of_containing_files
.
.
ResourceN_name storage_size bandwidth router_name list_of_containing_files

Description of parameters
Resource1_name .............. the name of the resource - arbitrary string, without spaces - uniquely defining the resource
storage_size ..................... the size of the HarddriveStorage in GB.
bandwidth ........................ bandwidth of the connection to the router in GB/s
router_name .................... the name of the router to which this resource is connected (see below network configuration)
list_of_containing_files .... the list of filenames of files (separated by spaces) which are stored on the storage of this resource (see file configuration)

Example: 
Res_0 100 0.1 router1 fileH testFile1

Res_1 100 0.1 router1 testFile2
Res_2 100 0.1 router1 fileF fileG

Network configuration file


Format of the file
Num_routers
router_name1
router_name2
.
.
router_nameN
router_nameI router_nameJ  bandwidthI_J  propDelay MTU

router_nameK router_nameL  bandwidthK_L  propDelay MTU
.
.
router_nameM router_nameR  bandwidthM_R  propDelay MTU

Description of parameters
Num_routers ...................... the number of routers (which names follow)
router_name ...................... arbitrary string (no spaces) defining the name of the router
bandwidthX_Y ................... bandwidth in GB/s between routers whose names are defined in the beginning of the line
 propDelay ......................... propagation delay in miliseconds
MTU .................................. minimal transmission unit in bytes

Example: 
2

router1
router2
router1 router2 0.1 10.0 1500

User configuration file

Format of the file
user1_name router_name RC_name bandwidth list_of_operations
user2_name router_name RC_name bandwidth list_of_operations
.
.
userN_name router_name RC_name bandwidth list_of_operations

Description of parameters
user1_name ........................... the name of the user
router_name .......................... the name of the router to which this user is connected
RC_name
............................... the name of the entity that acts as the users Replica Catalogue - it can be a resource which has a local RC
bandwidth .............................. bandwith to the router in MB/s
list_of_operations ..................  list of operations which the user will perform during the simulation separated by spaces (see Available operations below)

Available operations
get filename ............. transfer the file with this filename to the user
replicate filename resource_name .......... make a replica of the file with this filename on the resource resource_name
delete filename resource_name .......... delete a replica of the file with this filename on the resource resource_name
attribute filename .................................... get the file attribute (with all the information about a certain file)

Example:
user1 router2 Res_0 500.0 get testFile2 get testFile1 attribute testFile1 replicate testFile1 Res_0

<home>