Changes between Version 36 and Version 37 of Tutorials/a0Basic/Tutorial2
- Timestamp:
- Sep 29, 2014, 10:52:17 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Tutorials/a0Basic/Tutorial2
v36 v37 4 4 = Basic Tutorial: Hello World Example = 5 5 6 == 1. Developing a Script for an Experiment ==7 6 8 7 This tutorial presents a simple example, which shows you all the basic steps to quickly develop, run, and access the result of an experiment with OMF. Subsequent tutorials will build on this one to show you how to use other OMF features. 9 8 10 If you are a new OMF users, you may want to read the short [http://mytestbed.net/projects/omf/wiki/An_Introduction_to_OMF OMF System Overview] and/or [http://mytestbed.net/projects/omf/wiki/UsageOverview the Experiment Life-cycle Overview]. To run an experiment on the ORBIT testbed, in addtion to all the steps from [wiki:Documentation/GettingStarted getting started], a user needs to first describe the experiment in a ''script''. This ''script/experiment description'' is then passed on to a '''Experiment Controller''', which will use it to run and control the experiment execution. This process is illustrated in figure 1. 11 12 This script contains the experiment configuration and scenario. More precisely, it includes: 13 * a description of the required resources (e.g. nodes on the testbed, applications to run), 14 * their initializations and optional associations (e.g. nodeX is connected to NodeY, all nodes use channel 6 of 802.11g), 15 * a description of their operation throughout the experiment duration (e.g. applicationX starts at T0 and run for 60sec, nodeY switch wireless configuration after 100sec). 16 17 ORBIT experiment scripts are written using the Ruby scripting language. However, a user does '''not''' necessarily need to be familiar with Ruby to be able to write and run simple experiments. The only prerequisite skills are some prior basic knowledge and practice of any other scripting and/or programming languages (e.g. python, perl, c, java,...). Of course, to be able to develop more complex experiments a user will have to learn basics of Ruby and read about ORBIT-specific Ruby methods at some stage (more on these two issues at the end of this tutorial). 18 19 [[Image(OMF-User-View.png)]] 20 [[BR]]Figure 1. Execution of an Experiment from a User's point-of-view 21 22 == 2. "Hello World" experiment == 9 === Experiment Script === 23 10 24 11 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. … … 81 68 }}} 82 69 83 == 3. Understanding the "Hello World" script==70 === Understanding the "Hello World" script === 84 71 85 72 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. … … 149 136 150 137 151 == 4. Running the "Hello World" experiment==138 === Running the experiment === 152 139 153 140 Before being able to run this experiment, you should: … … 216 203 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] 217 204 218 [[BR]] 219 [[BR]] 220 == 5. Beyond the Basics == 221 222 === 5.1. More on the Ruby Language and the ORBIT-specific Ruby methods === 205 === Beyond the Basics === 223 206 224 207 As mentioned previously, ORBIT experiment scripts are written in Ruby, an easily understood, extensible, dynamic, object-oriented scripting language. Ruby has been extended into the testbed user's domain with a number of methods. Besides its extensibility and object-orientation, Ruby is concise and consistent. An ORBIT script therefore is written in Ruby primarily using ORBIT-specific methods. Users are encouraged to take look at following resources: