wiki:GEC16Agenda/WiMAX-Tutorial/Streamload/06

Version 14 (modified by Fraida Fund, 11 years ago) (diff)

--

Previous

Writing the Experiment Script

While the disk image is loading onto his nodes, he prepares an experiment script. This script describes the configuration of all the OMF-enabled resources in the experiment, and the sequence of events in the experiment.

The experiment script is given here:

defProperty('hrnSuffix', ".sb4.orbit-lab.org", "Suffix to use for the HRN of resources")
defProperty('hrnPrefix', "node1-", "Prefix to use for the HRN of resources")
defProperty('client1', "6", "ID for the first resource to use as downloader")
defProperty('client2', "5", "ID for the second resource to use as downloader")
defProperty('server', "9", "ID for the resource to use as server")
defProperty('duration', 120, "Duration of experiment")
defProperty('buffer', 4, "Buffer size for downloading base layer")
defProperty('window', 3, "Window to use for streamloading")


defGroup("server", "#{property.hrnPrefix}#{property.server}#{property.hrnSuffix}") do |node|
  node.net.e0.ip = '10.41.14.%y%'
  node.net.e0.netmask = "255.255.0.0"
end

defGroup("client1", "#{property.hrnPrefix}#{property.client1}#{property.hrnSuffix}") do |node|
  node.net.x0.profile = '51'
  node.net.x0.ip = '10.41.14.%y%'
  node.net.x0.netmask = "255.255.0.0"
  node.addApplication("wmxstat_universal") do |app|
    app.measure('status')
  end
  node.addApplication("streamload") do |app|
    app.setProperty('url', "http://10.41.14.#{property.server}:8000/root/")
    app.setProperty('video', "vidoe#{property.buffer}")
    app.setProperty('window', property.window)
    app.setProperty('streamload', "True")
    app.measure('dl', :samples =>1)
    app.measure('conf', :samples =>1)
    app.measure('play', :samples =>1)
  end
end

defGroup("client2", "#{property.hrnPrefix}#{property.client2}#{property.hrnSuffix}") do |node|
  node.net.x0.profile = '51'
  node.net.x0.ip = '10.41.14.%y%'
  node.net.x0.netmask = "255.255.0.0"
  node.addApplication("wmxstat_universal") do |app|
    app.measure('status')
  end
  node.addApplication("streamload") do |app|
    app.setProperty('url', "http://10.41.14.#{property.server}:8000/root/")
    app.setProperty('video', "video#{property.buffer}")
    app.setProperty('window', property.window)
    app.setProperty('streamload', "False")
    app.measure('dl', :samples =>1)
    app.measure('conf', :samples =>1)
    app.measure('play', :samples =>1)
  end
end


onEvent(:ALL_UP_AND_INSTALLED) do |event|
  wait 5
  system("/home/#{ENV['USER']}/getbsconf -i wimaxrf --oml-server tcp:oml:3003 --oml-id console --oml-exp-id #{Experiment.ID}")
  info "This is my experiment ID: #{Experiment.ID}"
  group("server").exec("/usr/bin/python -m SimpleHTTPServer")
  group("client1").startApplications
  wait property.duration
  group("client1").stopApplications
  wait 5
  group("client2").startApplications
  wait property.duration
  group("client2").stopApplications
  wait 5
  allGroups.stopApplications
  Experiment.done
end



Deconstructing the experiment script:
Every OMF-enabled node in the experiment (purple node) is represented by a "defGroup" stanza.
Every OML-enabled application that runs on an OMF node is represented by an "addApplication" stanza within the "defGroup"


Note that client1 is running the client application with streamloading, and client2 is running the client application without streamloading. The experimenter can directly compare the number of video layers downloaded with and without streamloading, under identical conditions, to measure the performance benefit of streamloading. (More video layers = better video quality = better performance).


Next