Changes between Version 30 and Version 31 of Tutorials/a0Basic/Tutorial2
- Timestamp:
- Feb 12, 2013, 5:45:57 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Tutorials/a0Basic/Tutorial2
v30 v31 6 6 == 1. Developing a Script for an Experiment == 7 7 8 As explained in the previous [wiki:NodeHandler/T utorial/Testbed overview] page, to run an experiment on the testbed a user needs to first describe the experiment in a ''script''. This ''script'' is then passed on to a '''Node Handler''', which will use it to run and control the experiment execution. This process is illustrated in figure 1.8 As explained in the previous [wiki:NodeHandler/Testbed overview] page, to run an experiment on the testbed a user needs to first describe the experiment in a ''script''. This ''script'' is then passed on to a '''Node Handler''', which will use it to run and control the experiment execution. This process is illustrated in figure 1. 9 9 10 10 This script contains the experiment configuration and scenario. More precisely, it includes: … … 22 22 == 2. "Hello World" experiment == 23 23 24 In this basic experiment, we define two groups of node : a ''sender'' and a ''receiver'' group. Although a group of nodecan contain several nodes, in this simple case each group contains only one node. We also associate a traffic generator application to the ''sender'' group, and a traffic sink application to the ''receiver'' group. We then define the configuration of the wireless interfaces on the nodes within these groups. Finally, we describe the successive actions to execute in order to perform the experiment.24 In this basic experiment, we define two groups of nodes: a ''sender'' group and a ''receiver'' group. Although a group of nodes can contain several nodes, in this simple case each group contains only one node. We also associate a traffic generator application to the ''sender'' group, and a traffic sink application to the ''receiver'' group. We then define the configuration of the wireless interfaces on the nodes within these groups. Finally, we describe the successive actions to execute in order to perform the experiment. 25 25 26 26 The script for this experiment is shown below. … … 57 57 58 58 # 59 # C) Configure the wireless interfaces of All the Nodes involved in59 # C) Configure the wireless interfaces of all the nodes involved in 60 60 # this experiment 61 61 # … … 86 86 == 3. Understanding the "Hello World" script == 87 87 88 As you noticed the "Hello World" script is almost ''human-readable'', and is quite understandable to any computer-literate reader. As already mentioned above, deep Ruby knowledge is '''not''' a prerequisite to running experiment on the ORBIT testbed.89 90 * The first part of this script uses the ORBIT method ''defGroup'' to define a group of nodes called ''sender'', which contains a unique node ''[1,1]''. Next, we perform some specific configurations on the node(s) within the group ''sender''. These specific configurations are described in a ''block'' (e.g. curly braces) that directly follows the ''defGroup'' call. Within this ''block'', we first assign a particular application to the ''sender'' node(s). This application is a traffic generator and is accessed via a ''prototype'' which is called ''test:proto:sender'' in this example. A prototype can be viewed as a wrapper around an existing application. It defines some set of properties (i.e. "parameters"), which allows us to customize the wrapped application for the specific need of an experiment. For example in this case, through the prototype we can set the address of the sender, and various parameters of the traffic generator itself, such as packet size, rate, and the protocol over which to send the traffic. Prototypes are normally defined in separate files, and the ORBIT platform has a set of predefined prototypes for some basic applications. For example, the prototype "test:proto:sender" is a wrapper around the application "otg" (orbit traffic generator). Other tutorials (see [wiki:Tutorial main page]) describes how to write your own prototypes for your own or existing applications. The last line on this 'sender' block configures the first wireless interface ''w0'' on the node(s) in this block into ''managed'' mode.88 As you noticed the "Hello World" script is almost ''human-readable'', and is quite understandable to any computer-literate reader. As already mentioned above, deep Ruby knowledge is '''not''' a prerequisite to running experiments on the ORBIT testbed. 89 90 * The first part of this script uses the ORBIT method ''defGroup'' to define a group of nodes called ''sender'', which contains a unique node ''[1,1]''. Next, we perform some specific configurations on the node(s) within the group ''sender''. These specific configurations are described in a ''block'' (e.g. curly braces) that directly follows the ''defGroup'' call. Within this ''block'', we first assign a particular application to the ''sender'' node(s). This application is a traffic generator and is accessed via a ''prototype'' which is called ''test:proto:sender'' in this example. A prototype can be viewed as a wrapper around an existing application. It defines some set of properties (i.e. "parameters"), which allows us to customize the wrapped application for the specific need of an experiment. For example in this case, through the prototype we can set the address of the sender, and various parameters of the traffic generator itself, such as packet size, rate, and the protocol over which to send the traffic. Prototypes are normally defined in separate files, and the ORBIT platform has a set of predefined prototypes for some basic applications. For example, the prototype "test:proto:sender" is a wrapper around the application "otg" (orbit traffic generator). Other tutorials (see [wiki:Tutorials main page]) describe how to write your own prototypes for your own or existing applications. The last line on this ''sender'' block configures the first wireless interface ''w0'' on the node(s) in this block into ''managed'' mode. 91 91 92 92 {{{ … … 168 168 }}} 169 169 170 * You can find detailed description of all the various experiment-specific scripting commands (such as ''defGroup'', ''allGroups'', ''whenAllInstalled'', etc...) in the '''Node Handler''' document page '''[wiki: Documentation/NodeHandlerhere]'''170 * You can find detailed description of all the various experiment-specific scripting commands (such as ''defGroup'', ''allGroups'', ''whenAllInstalled'', etc...) in the '''Node Handler''' document page '''[wiki:Old/NodeHandler/Commands/defNodes here]''' 171 171 172 172 [[BR]] … … 209 209 }}} 210 210 211 * Install a disk image which includes ''nodeAgent4'' on the nodes of this testbed. For example, you can use the latest ''baseline.ndz'' disk image. This disk image installation is done using the ''omf load'' command above. Detailed instructions on how to perform such disk image installation on the nodes on a testbed can be found [wiki:Tutorial /HowToImage here].211 * Install a disk image which includes ''nodeAgent4'' on the nodes of this testbed. For example, you can use the latest ''baseline.ndz'' disk image. This disk image installation is done using the ''omf load'' command above. Detailed instructions on how to perform such disk image installation on the nodes on a testbed can be found [wiki:Tutorials/HowToImage here]. 212 212 213 213 … … 248 248 }}} 249 249 250 '''Congratulation ''' you just ran your first experiment script on the Orbit Testbed!251 252 You will find information on how to collect and interpret measurements and results from your experiment in the next parts of this basic tutorial, [wiki:Tutorial /CollectMeasurements here] and [wiki:Tutorial/AnalyzeResults here]250 '''Congratulations''' you just ran your first experiment script on the Orbit Testbed! 251 252 You will find information on how to collect and interpret measurements and results from your experiment in the next parts of this basic tutorial, [wiki:Tutorials/CollectMeasurements here] and [wiki:Tutorials/AnalyzeResults here] 253 253 254 254 [[BR]] … … 265 265 === 5.2. More Tutorials === 266 266 267 Once you are done with the remaining parts of this basic tutorial (i.e. [wiki:Tutorial /CollectMeasurements collecting] and [wiki:Tutorial/AnalyzeResults interpreting] experiment measurements and results), you might want to have a look at the other tutorials on the [wiki:Tutorialmain page] to further learn about the other ORBIT functions that can help you develop your own complex experiments.267 Once you are done with the remaining parts of this basic tutorial (i.e. [wiki:Tutorials/CollectMeasurements collecting] and [wiki:Tutorials/AnalyzeResults interpreting] experiment measurements and results), you might want to have a look at the other tutorials on the [wiki:Tutorials main page] to further learn about the other ORBIT functions that can help you develop your own complex experiments. 268 268 269 269 === 5.3. Definitions of the Prototypes and Application used in the "Hello World" script ===