Skip to content

Commit

Permalink
First draft of OEDL Experiment Description
Browse files Browse the repository at this point in the history
  • Loading branch information
thierryr committed Feb 25, 2015
1 parent 8d406b6 commit 9774323
Showing 1 changed file with 152 additions and 0 deletions.
152 changes: 152 additions & 0 deletions gec22_demo/gec22demo_1.oedl
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# Load the external OMF6 Application Definition that we need
loadOEDL('https://raw.githubusercontent.com/mytestbed/gec_demos_tutorial/master/gec22_demo/vlc-oml.oedl')
loadOEDL('https://raw.githubusercontent.com/mytestbed/gec_demos_tutorial/master/gec22_demo/web_redirector/redirector.oedl')
loadOEDL('https://raw.githubusercontent.com/mytestbed/gec_demos_tutorial/master/gec22_demo/lighttpd.oedl')

# Define some parameters

# This should be the Address to the Web Redirector!
defProperty('redirector_address', 'a.b.c.d', 'URL for the video to play')
defProperty('redirector_port', '9292', 'URL for the video to play')

# The YAML Configuration for the Web Redirector
# Note: could be turned into an experiment property if needed...
# NO CIDR NOTATION SUPPORT!!!
# Convention:
# - net_A_B_C_D for the network IP address A.B.C.D
# - net_A_B_C for the network IP address A.B.C.0
# - net_A_B for the network IP address A.B
# - net_A for the network IP address A
# - default for everything else
#
redirect_configuration =
<<-TEXT
"net_10_15:
status: 303
location: 'http://www.google.com'

net_192_168_1:
status: 303
location: 'http://www.w3.org'

default:
status: 303
location: 'http://a.b.c.d/video/bunny_2s/BigBuckBunny_2s_isoffmain_DIS_23009_1_v_2_1c2_2011_08_30.mpd'"
TEXT


# Get the list of available resources for this experiment and separate them
#
# TODO: when this is finalised add below the steps to extract from the list of
# resources:
# - the ones that will be used as "Video Players" and divide them in multiple groups
# - the one to be used as the "Redirect Entity"
# - the ones that will be used as "Content Providers"
#
# available_resources = getResources()

# HACK: As the function of getting resources automatically for this demo is not
# yet finalised, do the following resource assignment and separation here for
# testing purpose

video_players = [
['x'],
['y'],
['z'],
]

redirect_entity = 'w'

content_prodivers = [ 'v' ]

video_players.each_index do |i|
defGroup("video_player_group_#{i}", *video_players[i]) do |group|
group.addApplication('vlc') do |app|
app.setProperty('input', "http://#{prop.redirector_address}:#{prop.redirector_port}")
app.measure('dashDlSession', :samples =>1)
app.measure('dashRateAdaptation', :samples =>1)
end
end
end

defGroup('redirector_group', redirect_entity) do |group|
group.addApplication('web_redirector_config') do |app|
app.setProperty('config', redirect_configuration)
end
group.addApplication("web_redirector") do |app|
app.setProperty('host', prop.redirector_address)
end
end

defGroup('provider_group', *content_prodivers) do |group|
group.addApplication('lighttpd')
end


onEvent(:ALL_UP) do

t0 = 5 # [s]
t_interval_between_players = 20 # [s]

after t0 do
info(" ------ Start Content Providers")
group('provider_group').startApplications
end

after t0+5 do
info(" ------ Configure Web Redirector")
group('redirector_group').startApplication('web_redirector_config_cxt_0')
end

after t0+10 do
info(" ------ Start Web Redirector")
group('redirector_group').startApplication('web_redirector_cxt_0')
end

video_players.each_index do |i|
after t0 + t_interval_between_players*(i+1) do
info(" ------ Start Video Player Group #{i}")
group("video_player_group_#{i}").startApplications
end
end

after t0+80 do
info(" ------ Now Stop the experiment")
video_players.each_index do |i|
group("video_player_group_#{i}").stopApplications
end
group('redirector_group').stopApplications
group('provider_group').stopApplications
end

after t0+85 do
Experiment.done
end
end

# defGraph 'DashRate1' do |g|
# g.ms('dashRateAdaptation').select {[:oml_ts_client, :decisionRate_bps, :oml_sender_id]}
# g.caption "Decision Rate."
# g.type 'line_chart3'
# g.mapping :x_axis => :oml_ts_client, :y_axis => :decisionRate_bps, :group_by => :oml_sender_id
# g.xaxis :legend => 'time [s]'
# g.yaxis :legend => 'Decision Rate', :ticks => {:format => 's'}
# end

# defGraph 'DashRate2' do |g|
# g.ms('dashRateAdaptation').select {[:oml_ts_client, :empiricalRate_bps, :oml_sender_id]}
# g.caption "Empirical Rate"
# g.type 'line_chart3'
# g.mapping :x_axis => :oml_ts_client, :y_axis => :empiricalRate_bps, :group_by => :oml_sender_id
# g.xaxis :legend => 'time [s]'
# g.yaxis :legend => 'Empirical Rate', :ticks => {:format => 's'}
# end

# defGraph 'DashRate3' do |g|
# g.ms('dashRateAdaptation').select {[:oml_ts_client, :buffer_percent, :oml_sender_id]}
# g.caption "VLC Buffer Percentage"
# g.type 'line_chart3'
# g.mapping :x_axis => :oml_ts_client, :y_axis => :buffer_percent, :group_by => :oml_sender_id
# g.xaxis :legend => 'time [s]'
# g.yaxis :legend => 'Buffer Percentage [%] ', :ticks => {:format => 's'}
# end

0 comments on commit 9774323

Please sign in to comment.