179 | | Walk-through the above OEDL experiment description: |
180 | | |
181 | | * Here we define some experiment properties, which will allow us to parameterize the values for the slice, the resources, and the application settings used in the experiment. As mentioned earlier, these values may be customized for each experiment run. We further declare variables (internal to the experiment descriptions), which facilitate our specific use of properties within this given experiment example. |
| 181 | '''Walk-through the above OEDL experiment description''' |
| 182 | |
| 183 | 1. Here we define some experiment properties, which will allow us to parameterize the values for the slice, the resources, and the application settings used in the experiment. As mentioned earlier, these values may be customized for each experiment run. Compared to the previous first simple experiment, here we further declare variables (internal to the experiment descriptions), which facilitate our specific use of properties within this given experiment example. |
198 | | |
199 | | defApplication('bttrack') do |app| |
200 | | .. |
201 | | end |
202 | | |
203 | | defApplication('transmission_daemon') do |app| |
204 | | ... |
205 | | end |
206 | | |
207 | | defApplication('vlc') do |app| |
208 | | ... |
209 | | end |
210 | | }}} |
211 | | |
212 | | |
213 | | |
| 200 | ... |
| 201 | }}} |
| 202 | 3. Compared to the previous experiment, here we are setting the attribute ''quiet'' of the application to ''true''. This tells the resource controller which starts and monitors the application to log any application outputs locally, thus they will not be reported in !Labwiki's Execute column. |
| 203 | {{{ |
| 204 | defApplication('clean_all') do |app| |
| 205 | ... |
| 206 | app.quiet = true |
| 207 | end |
| 208 | }}} |
| 209 | 4. We follow with the definition of the groups of resources, which we will use in this experiment |
| 210 | * tracker: this group includes a single resource, which will act as the BitTorrent tracker for the other resources. We associate a ''bttrack'' application to this group, and set the parameter properties for that application. |
| 211 | * seeder: this group holds the resources which will seed the video content to the other resources. Thus it has a transmission daemon application associated to it, with the correct parameter set. |
| 212 | * leecher: this group contains the resources which will download the video content from other peers. It also has an associated transmission daemon application. |
| 213 | * player: this group has the same resources as the previous leecher groups and differs only by its associated application, which in this case is the VLC player, configured with the URI of the video content to play. |
| 214 | * allresources: this group includes all resources used in this experiment, and is used to make sure that any previous application instances from previous experiment runs are terminated at the beginning of this particular run. |
| 215 | * all_leechers: this groups contains the same resources as the leecher group, and is used to ensure that no previously downloaded content remains on these peers before they start their current download. |
| 216 | {{{ |
| 217 | defGroup('tracker', *tracker) do |g| |
| 218 | ... |
| 219 | end |
| 220 | |
| 221 | defGroup('seeder', *seeder) do |g| |
| 222 | ... |
| 223 | end |
| 224 | ... |
| 225 | }}} |
| 226 | 5. We then define the tasks to perform when all the resources and declared applications in all the defined groups are ready. |
| 227 | * tracker: this group includes a single resource, which will act as the BitTorrent tracker for the other resources. We associate a ''bttrack'' application to this group, and set the parameter properties for that application. |
| 228 | * seeder: this group holds the resources which will seed the video content to the other resources. Thus it has a transmission daemon application associated to it, with the correct parameter set. |
| 229 | * leecher: this group contains the resources which will download the video content from other peers. It also has an associated transmission daemon application. |