Commit e1799526 authored by yvonneanne's avatar yvonneanne

initial commit

parent 5cf0816f
# fast-failover
This repository contains the source code for the experiments in the following three papers
Code for papers from INFOCOM 2019, DSN 2019, SRDS 2019, and future work
\ No newline at end of file
[SRDS 2019: Improved Fast Rerouting Using Postprocessing]{https://www.univie.ac.at/ct/stefan/srds19failover.pdf}
[DSN 2019: Bonsai: Efficient Fast Failover Routing Using Small Arborescences]{https://www.univie.ac.at/ct/stefan/dsn19.pdf}
[Infocom 2019: CASA: Congestion and Stretch Aware Static Fast Rerouting]{https://www.univie.ac.at/ct/stefan/infocom2019e.pdf}
by Klaus-Tycho Foerster, Andrzej Kamisinski, Yvonne-Anne Pignolet, Stefan Schmid, Gilles Tredan
We are indebted to Ilya Nikolaevskiy, Aalto University, Finland, on whose source code for [this paper](
http://www.dia.uniroma3.it/~compunet/www/docs/chiesa/Resiliency-ToN.pdf) we based our implementation.
If you use this code, please cite the corresponding paper(s).
## Bibtex
@INPROCEEDINGS{srds19foerster,
author = {Klaus-Tycho Foerster and Andrzej Kamisinski and Yvonne-Anne Pignolet and Stefan Schmid and Gilles Tredan},
title = {Improved Fast Rerouting Using Postprocessing},
booktitle = {Proc. 38th International Symposium on Reliable Distributed Systems (SRDS)},
year = {2019},
}
@INPROCEEDINGS{dsn19foerster,
author = {Klaus-Tycho Foerster and Andrzej Kamisinski and
Yvonne-Anne Pignolet and Stefan Schmid and Gilles Tredan},
title = {Bonsai: Efficient Fast Failover Routing Using Small Arborescences},
booktitle = {Proc. 49th IEEE/IFIP International Conference on Dependable Systems and Networks (DSN)},
year = {2019},
}
@INPROCEEDINGS{infocom19foerster,
author = {Klaus-Tycho Foerster and Yvonne-Anne Pignolet and Stefan Schmid and Gilles Tredan},
title = {CASA: Congestion and Stretch Aware Static Fast Rerouting},
booktitle = {Proc. IEE INFOCOM},
year = {2019},
}
## Overview
* benchmark_graphs: directory to be filled with network topologies used in the experiments
* results: directory to which csv and other output files are written
* arborescence.py: arborescence decomposition and helper algorithms
* routing_stats.py: routing algorithms, simulation and statistic framework
* objective_function_experiments.py: objective functions, independence and SRLG experiments
* srds2019_experiments.py: experiments for SRDS 2019 paper
* dsn2019_experiments.py: experiments for DSN 2019 paper
* infocom2019_experiments.py: experiments for Infocom 2019 paper
For some experiments topologies from [Rocketfuel]{https://research.cs.washington.edu/networking/rocketfuel/} and the [Internet topology zoo]{http://www.topology-zoo.org/} networks need to downloaded and copied into the benchmark_graphs directory.
To run the experiments for the SRDS paper, execute the corresponding python file:
```
python srds2019_experiments.py
```
With additional arguments the experiments can be customised (see main function of the python file). E.g.,
```
python srds2019_experiments.py all 6 1
```
executes 1 repetition of all SRDS experiments with seed 6. Similarly, the experiments for the other papers can be executed. In case of questions please send an email to Yvonne-Anne Pignolet, ya at last name dot ch.
\ No newline at end of file
This diff is collapsed.
For some experiments topologies from [Rocketfuel]{https://research.cs.washington.edu/networking/rocketfuel/} and the [Internet topology zoo]{http://www.topology-zoo.org/} networks need to downloaded and copied into this.
This diff is collapsed.
import sys
import networkx as nx
import numpy as np
import itertools
import random
import time
from objective_function_experiments import *
# run experiments for infocom 2019 paper
# seed is used for pseudorandom number generation in this run
# switch determines which experiments are run
def infocom_experiments(switch):
write_graphs()
print('generated graphs')
for (method, name) in [(RandomTrees, 'Random'), (Trees, 'Greedy')]:
if switch in ['subset', 'all']:
experiment_objective_subset(
measure_stretch, method, "stretch_for_subset_"+name)
experiment_objective_subset(
measure_load, method, "load_for_subset_"+name)
if switch in ['independent', 'all']:
print(name, 'independent experiments')
experiment_objective(num_independent_paths_in_arbs,
method, "independent_paths_"+name)
if switch in ['SRLG', 'all']:
print(name, 'SRLG experiments')
experiment_SRLG(method, name)
if __name__ == "__main__":
start = time.time()
seed = 1
n = 100
rep = 100
k = 8
f_num = 40
samplesize=20
switch = 'all'
if len(sys.argv)>1:
switch = sys.argv[1]
if len(sys.argv)>2:
seed = sys.argv[2]
if len(sys.argv) > 3:
rep = int(sys.argv[3])
set_parameters([n, rep, k, samplesize, f_num, seed, "infocom-"])
infocom_experiments(switch)
end = time.time()
print(end-start)
print(time.asctime( time.localtime(start)))
print(time.asctime( time.localtime(end)))
This diff is collapsed.
This directory will contains the output files of the experiments.
This diff is collapsed.
import sys
import networkx as nx
import numpy as np
import itertools
import random
import time
from objective_function_experiments import *
def run_experiments():
global name, n, rep, k, samplesize, f_num, seed
write_graphs()
print('generated graphs')
for (method, name) in [(Trees, 'Greedy'), (RR_swap, 'RR-swap')]:
if switch in ['zoo', 'all']:
original_params = [n, rep, k, samplesize, f_num, seed, "srds-"]
zoo_count = 0
for i in range(261):
rep = 2
samplesize = 10
f_num= 5
n = 20
set_parameters([n, rep, k, samplesize, f_num, seed, "zoo-srds-"])
g = read_zoo(i)
if g == None or len(g.nodes) > n:
continue
k = nx.edge_connectivity(g)
n = len(g.nodes())
m = len(g.edges())
print('i, nodes, edges, k', i, n, m, k)
samplesize = min(int(n/2), samplesize)
f_num = min(int(m/4), f_num)
set_parameters([n, rep, k, samplesize, f_num, seed, "zoo-srds-"])
experiment_objective_subset(measure_stretch, method, str(
f_num)+"_stretch_for_subset_"+name, seed=i, gml=True)
experiment_objective_subset(measure_load, method, str(
f_num)+"_load_for_subset_"+name, seed=i, gml=True)
# experiment_objective_subset(measure_dividedbyhops, method, "divided_by_hops_for_important_sources_"+name, seed=seed)
zoo_count += 1
print('Ran '+str(zoo_count)+' zoo experiment successfully')
[n, rep, k, samplesize, f_num, seed, name] = original_params
set_parameters(original_params)
if switch in ['subset', 'all']:
experiment_objective_subset(measure_stretch, method, str(
f_num)+"_stretch_for_subset_"+name, seed=seed)
experiment_objective_subset(measure_load, method, str(
f_num)+"_load_for_subset_"+name, seed=seed)
if switch in ['independent', 'all']:
experiment_objective(num_independent_paths_in_arbs, method, str(
f_num)+"_independent_paths_"+name, seed=seed)
if switch in ['SRLG', 'all']:
experiment_SRLG(method, str(f_num)+"_"+name, seed=seed)
experiment_SRLG_node_failures(
method, str(f_num)+"_"+name, seed=seed)
if __name__ == "__main__":
start = time.time()
seed = 1
n = 100
rep = 100
k = 8
f_num = 40
samplesize=20
switch = 'all'
if len(sys.argv) > 1:
switch = sys.argv[1]
if len(sys.argv) > 2:
seed = int(sys.argv[2])
if len(sys.argv) > 3:
rep = int(sys.argv[3])
random.seed(seed)
set_parameters([n, rep, k, samplesize, f_num, seed, "srds-"])
run_experiments()
end = time.time()
print(end-start, 'seconds')
print('start time', time.asctime(time.localtime(start)))
print('end time', time.asctime(time.localtime(end)))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment