Giter Club home page Giter Club logo

bjointsp-adapter's People

Contributors

adnan904 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

bjointsp-adapter's Issues

B-JointSP evaluation

Discussion on how to best evaluate B-JointSP and compare it against other algorithms (mostly DDPG). Related to https://github.com/RealVNF/evaluation/issues/29

Current approach:

  • Fix run duration to 6 (instead of 100 like DDPG) and pass info from all incoming flows within the 6 timesteps as input to B-JointSP
  • Reason: B-JointSP treats all specified flows as long-running parallel flows competing for resources.
  • But flows arriving more than 6 time steps after another are sequential and do not compete for resources. If we gave all these flows as input B-JointSP would over-estimate the resource requirements, conclude that there are not enough resources, and place all VNFs uniformly to minimize-over subscription
  • Resulting placements and mappings of flows are then converted to placments and scheduling rules that are passed to the simulator
  • Another issue with runs of length 6:
    • If no flows arrive during a run, B-JointSP is not even called, but the run is simply skipped without changing the schedule
    • But with random arrival if flows arrive for one ingress but not for another, B-JointSP removes all VNFs for the unused ingress. The next following flows will then be dropped because no VNFs are available for the ingress.

Alternative:

  • Goal: Use same run duration for both DDPG and B-JointSP. DDPG doesn't work well with run duration 6.(?) So let's set run duration 100 for both
  • Calculate the average data rate during the run in the simulator and provide it to the B-JointSP adapter. Eg, 10 flows of size 1 within 100 time steps (det. arrival) --> Rate of 10/100 = 0.1
  • Take the processing time (VNF delay + flow length) into account, which affects the required resources (in our case 6). --> 0.1 * 6 = 0.6. Round up to 1.
  • Divide by flow size (1) to calculate the number of flows. Here: 1/1=1 (but may be more during bursts or MMP).
  • Thus pass 1 flow of size 1 to the B-JointSP

This way, we would calculate roughly the data rate that needs to be served in parallel. But still split it into separate flows of the pre-defined size (here, 1) such that B-JointSP can embed the flows separately.

Does that make sense? @adnan904 @qarawlus

B-JointSP Adapter: Don't normalize schedule if now flow at source node

As discussed:

  • Always keep prev_schedule from last run.
  • Before the first run, init prev_schedule to uniform distribution for all nodes
  • When B-JointSP is called and flows arrive for some source but not for all, currently it normalizes 0, 0, 0, ... setting a uniform distribution for nodes without flows. Then when new flows arrive, they are dropped because they are sent to nodes without VNFs due to the uniform distribution.
  • Instead, if B-JointSP is called and there are no flows for a sources, keep its prev_schedule rather than normalizing the 0s and resetting to a uniform schedule

Document conversions by adapter

Please add an overview in the Readme (before setup) that contains info about what the adapter does. At least:

  • How do simulator observations and inputs of B-JointSP differ? How does the adapter convert from simulator observations to inputs for B-JointSP?
  • How do B-JointSP outputs and actions/inputs to the simulator differ? How does the adapter convert them?
  • Any other assumptions we made in the adapter? Eg, assume only one SFC (I saw a comment in the code).

Best to check comments in the code, old notes/issues, eg, CN-UPB/B-JointSP#17, if you're not sure anymore. A few bullet points are fine, no long text please.

adapter failure after initial installation

(venv) (base) G:\bjointsp-adapter>bjointsp-adapter -n "res/networks/triangle.graphml" -sf "res/service_functions/abc.yaml" -c "res/config/sim_config.yaml" -i 50
sfc_1's weight: 6.0

Best overlays:
Overlay of sfc_1
        4 instances: (vnf_source,pop0):[f1] (a,pop0) (b,pop0) (c,pop0)
        3 edges: (vnf_source,pop0):[f1]->(a,pop0):[f1] (a,pop0)->(b,pop0):[f1] (b,pop0)->(c,pop0):[f1]
Writing solution to results/bjointsp\triangle-sfc_1-first_source-2019-09-24_13-10-15_2034.yaml
Traceback (most recent call last):
  File "g:\bjointsp-adapter\venv\lib\site-packages\coordsim\simulation\flowsimulator.py", line 205, in process_flow
    demanded_total_capacity += self.params.sf_list[sf_i]['resource_function'](sf_data['load'])
KeyError: 'vnf_source'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "g:\bjointsp-adapter\venv\lib\site-packages\coordsim\simulation\flowsimulator.py", line 121, in pass_flow
    yield self.env.process(self.process_flow(flow, sfc))
KeyError: 'vnf_source'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "g:\bjointsp-adapter\venv\lib\site-packages\coordsim\simulation\flowsimulator.py", line 96, in init_flow
    yield self.env.process(self.pass_flow(flow, sfc))
KeyError: 'vnf_source'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "G:\bjointsp-adapter\venv\Scripts\bjointsp-adapter-script.py", line 11, in <module>
    load_entry_point('bjointsp-adapter==0.0.2', 'console_scripts', 'bjointsp-adapter')()
  File "g:\bjointsp-adapter\venv\lib\site-packages\adapter\adapter.py", line 104, in main
    apply_state = simulator.apply(action)
  File "g:\bjointsp-adapter\venv\lib\site-packages\siminterface\simulator.py", line 113, in apply
    self.env.run(until=runtime_steps)
  File "g:\bjointsp-adapter\venv\lib\site-packages\simpy\core.py", line 138, in run
    self.step()
  File "g:\bjointsp-adapter\venv\lib\site-packages\simpy\core.py", line 230, in step
    raise exc
KeyError: 'vnf_source'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.