Giter Club home page Giter Club logo

iflye's Introduction

iflye

ifyle is an open-source framework for Incremental Fast Lightweight (y) virtual network Embedding.

Installation (development)

  • Install Temurin JDK17 or newer.
  • Install GIPS as described here or use the pre-built Eclipse.
  • Install Gurobi in version 11.0.2 and activate a license for your computer.
    • Currently, Gurobi is the default ILP solver used in iflye.
  • Install IBM ILOG CPLEX in version 22.1.1.
    • CPLEX is an alternative ILP solver in iflye. You do not need it explicitely, but if you did not install and configure it properly, at least one test case will fail.
    • Please notice: CPLEX does not support SOS1 constraints with equal weights (as usually desired by the PM-/ILP-based algorithms in this projects). Therefore, the adapter implementation ignores all SOS1 constraint creations.
  • Launch a runtime workspace (while using a runtime Eclipse) as stated in the eMoflon::IBeX installation steps.
    • Additionally, the runtime workspace needs some environment variables to access the Gurobi and the CPLEX solver. Do not forget to adapt them to your individual setup:
# Linux/macOS
GRB_LICENSE_FILE=/home/mkratz/gurobi.lic
GUROBI_HOME=/opt/gurobi1102/linux64/
LD_LIBRARY_PATH=/opt/gurobi1102/linux64/lib/
PATH=/opt/gurobi1102/linux64/bin/:/opt/ibm/ILOG/CPLEX_Studio2211/cplex/bin/x86-64_linux/:$PATH

# Windows
GRB_LICENSE_FILE=C:\Users\mkratz\gurobi.lic
GUROBI_HOME=C:\gurobi1102\win64
LD_LIBRARY_PATH=C:\gurobi1102\win64\lib
PATH=C:\gurobi1102\win64\bin;C:\Program Files\IBM\ILOG\CPLEX_Studio2211\cplex\bin\x64_win64\

Project setup (manual)

  • Clone this Git repository to your local machine and import it into Eclipse: File -> Import -> General -> Existing Projects into Workspace. Import all projects.
  • Clone the GIPS examples repo to your local machine and import it into Eclipse: File -> Import -> General -> Existing Projects into Workspace. Import (at least) the following projects:
    • network.model
    • org.emoflon.gips.gipsl.examples.mdvne
    • org.emoflon.gips.gipsl.examples.mdvne.migration
    • org.emoflon.gips.gipsl.examples.mdvne.seq
  • Inside the runtime workspace, build all projects (Project -> Clean... -> Clean all projects) to trigger code generation.
    • Build the projects network.model, network.model.rules, network.model.rules.racka, network.model.rules.rackb, and network.model.rules.vnet with the black eMoflon hammer symbol.
    • Build the GIPS projects mentioned above with the black eMoflon hammer symbol.
  • Run the script gips-ex-to-iflye.sh (Linux/macOS) or gips-ex-to-iflye.bat.
    • This script copies some of the build-artifacts of the GIPS-based projects to the correct location so that they can be loaded by the engine at runtime.
    • You have to re-run the script every time you changed the GIPSL-specification of the projects org.emoflon.gips.gipsl.examples.mdvne*.

A good start point to verify your installation is to run the included unit tests, refer to the test section.

Project setup (PSF)

  • As an alternative to the previous project setup section, you can use this PSF file for the import of all necessary projects.

Code-Style

This project uses the built-in code-style and code-formatter of Eclipse. Before contributing, please set-up your Eclipse code-style settings as follows:

  • Window -> Preferences -> Java
    • -> Code Style -> Clean Up -> Active profile: -> "Eclipse [built-in]" (default)
    • -> Code Style -> Formatter -> Active profile: -> "Eclipse [built-in]" (default)
    • -> Code Style -> _Organize Imports: -> "java, javax, org, com" (default)
    • -> Editor -> _Save Actions:
      • Check "Perform the selected actions on save"
      • Check "Format source code"
      • Check "Format all lines"
      • Check "Organize imports"
      • Check "Additional actions"

By using this settings, you should be unable to commit unformatted code.

Usage (running simulations)

After finishing the installation steps, you may run simulations, e.g., from the examples project. There are some examples for network generators as well as embedding algorithms. All examples contain a public static void main(final String[] args) method as entry point and can be run as Java appication from within the Eclipse workspace.

CLI usage

You may want to run the whole program as one exported file, e.g., on a server via the CLI for measurement purposes. To export the whole project as executable JAR file, follow this step:

  • File -> Export... -> Java/Runnable JAR file -> Next -> (Chose your launch configuration) -> (Chose the export destination) -> Library handling: Package required libraries into generated JAR -> Finish

Depending on your launch configuration, you can start the JAR file with additional arguments. Example:
$ java -jar iflye.jar --algorithm taf --objective total-taf-comm --snetfile resources/two-tier-12-pods/snet.json --vnetfile resources/two-tier-12-pods/vnets.json --csvpath metrics.csv

For larger simulations, you may want to increase the Java heap space. Example with 32 GiB: $ java -Xmx32g -jar iflye.jar $parameters

In the subfolder scripts/ are some basic Bash scripts to run parameter sweeps as well as CLI argument parsing into the scenario.

Scenario loader

As this project is the small sibling of the iDyVE project, you may want to run the same scenarios in both frameworks, e.g., to compare the performance. For this purpose, iflye has a built in model converter which can read virtual and substrate networks from JSON export files (e.g., from iDyVE).

The chosen JSON format is loosly coupled with the used metamodel. Therefore, it acts as a kind of abstract model representation to transfer models from one metamodel/framework to the other.

Feel free to check out some examples in vne.scenarios/resources/*/.

Tests

Various test cases to test the framework as well as some of the implemented VNE algorithms are implemented in the project test.suite. To start them, follow this step:

  • Right click on test.suite -> Run As... -> JUnit Test

Please notice: The test IlpSolverSetupTest will check your Gurobi/CPLEX installation and configuration. If this test fails, at least one of the two ILP solvers is not configured properly.

Visualization

For easier debugging purposes, a basic GUI for visualizing networks is implemented in the project network.visualization based on GraphViz. Currently, it can render tree-based networks as tree structures or use the automatic mode of GraphViz from a model file model.xmi in the examples project. Therefore, launch the class Ui with these arguments: ../examples/model.xmi sub 1

  • ../examples/model.xmi is the path of the model to read.
  • sub is the name of the (substrate) network to visualize.
  • 1 configures the automatic layout. You can also chose 0 to use a tree-like layout.

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE.md file for more details.

iflye's People

Contributors

arg0n1s avatar maxkratz avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

iflye's Issues

Feature request: Rating of matches

Another idea to improve the embedding quality as well as the performance: Rating of matches:

  • for embedding candidates
  • for removal candidates (in case of migration)

Ideas:

  • cost function for matches to calculate their cost/quality

Example criteria:

  • remove matches from particularly full or particularly empty substrate servers

The cost function (e.g., with input = all attributes of all nodes of a match) could, for example, be learned by ML approaches.

Fix Windows incompatibility and/or document it

Currently, the framework has some functionality that relies on Linux system calls:

  • Memory PID metric (Java implementation uses Linux system calls)
  • Bash scripts
  • EmoflonGtAppUtils (may feature Linux-style paths, e.g., '/a/b/c')

Documentation issue: Current need to use feature branches in emoflon-ibex and emoflin-ibex-ui

After merging maxkratz@3b65798 into the branch main, the whole project is only executable while using some feature branches on emoflon-ibex and emoflon-ibex-ui.

This issue can be closed if both branches mentioned above are merged in the master branches of the corresponding emoflon-ibex* projects.

Fix minor implementation issues

There are some minor implementation issues left, typically marked with a TODO.

PM-Migration VNE algorithm concept extension

As for now, the implementation of the MdVNE algorithm PM with migration enabled tries to re-embed virtual networks until a previously set value of n.

Idea: Try to find a good heuristic to set n to a useful value for a good speed to quality ratio.

Metric idea: Embedding quality per time

Maybe we can implement a metric that gives a result for "embedding quality per time". This could give a trade-off between long runtimes but good results (pure ILP algorithms) and short runtimes but bad results (pure heuristic algorithm).

Implement removal of substrate switches

Compared to the removal functionality of substrate servers, the framework, i.e., the class ModelFacade.java, should feature a method the remove substrate switches.

Adapt visualization to master thesis

Currently, the visualization of iflye uses circles as servers and boxes as switches. This is exactly the other way around than in my master thesis.

Remove duplicate vnets.json files

Currently, there are duplicated virtual network JSON files in vne.scenarios/resources/*/vnets.json. Do not forget to also update the evaluation scripts if you remove these files.

Update Gurobi solver

Currently, the framework uses version 8.1.1, build v8.1.1rc0, of the Gurobi solver to make the performance comparable to iDyVE's implementation. However, after I submitted my master thesis, Gurobi can be upgraded to the latest version (9.1.2 at the time of this issue).

Refactor inherited test cases (e.g., VnePmMigration)

Currently, there are various test classes that inherit a super test class and just overwrite the method to create a new algorithm instance to test. As this is a bad coding style, one may refactor the test cases to parametrized tests to remove the high number of classes for each test case.

Example file: https://github.com/maxkratz/iflye/blob/1bc84da8d29f8ef0b6f89b848bca2d90db743fe0/test.suite/src/test/algorithms/pm/migration/VnePmMdvneAlgorithmMigrationTotalCommunicationCostATest.java#L21

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.