Giter Site home page Giter Site logo

icarus-sim / icarus Goto Github PK

View Code? Open in Web Editor NEW
62.0 8.0 38.0 625 KB

A scalable simulator for evaluating the performance of in-network caches in Information Centric Networking (ICN)

Home Page: http://icarus-sim.github.io

License: Other

Makefile 0.22% Python 99.53% Dockerfile 0.25%
simulator caching icn cdn python

icarus's Introduction

Icarus ICN caching simulator

Icarus is a Python-based discrete-event simulator for evaluating caching performance in Information Centric Networks (ICN).

Icarus is not bound to any specific ICN architecture. Its design allows users to implement and evaluate new caching policies or caching and routing strategy with few lines of code.

This document explains how to configure and run the simulator.

Installation

First, ensure that you have Python installed on your machine with version 2.7.9+ or 3.4+.

Then, clone this repository on your local machine and run:

$ make install

This downloads and installs all required dependencies and installs Icarus in editable mode. This means that you can make changes directly on the source code to have effect on your installation.

Usage

You can use Icarus in three different ways:

  • Run simulations using models provided by Icarus
  • Process and analyze results from those simulations
  • Use Icarus modeling tools into your own code.

You can a set of simulations by executing:

$ icarus run --results <RESULTS_FILE> <CONF_FILE>

where:

  • RESULTS_FILE is the pickle file in which results will be saved,
  • CONF_FILE is the configuration file describing the experiments to run.

To learn how to set up the configuration file, you may want to look at config.py and possibly modify it according to your requirements. Alternatively, you can look at the examples folder which contains examples of configuration files for various use cases.

Once simulations complete you can print the content of your results file into a human readable format, running:

$ icarus results print <RESULTS_PICKLE_FILE> > <OUTPUT_TEXT_FILE>

Icarus also provides a set of helper functions for plotting results. Look at the examples folder for plot examples.

By executing the steps illustrated above it is possible to run simulations using the topologies, cache policies, strategies and result collectors readily available on Icarus. Icarus makes it easy to implement new models to use in simulations.

To implement new models, please refer to the description of the simulator provided in this paper:

L.Saino, I. Psaras and G. Pavlou, Icarus: a Caching Simulator for Information Centric Networking (ICN), in Proc. of SIMUTOOLS'14, Lisbon, Portugal, March 2014. [PDF], [Slides], [BibTex]

Otherwise, please browse the source code. It is very well documented and easy to understand.

Finally, Icarus provides utilities for modeling the performance of caches and work with traffic traces. The code is included in the icarus.tools package. These tools are described in detail in this paper.

Docker container

This repository contains a Dockerfile that can be used to build a container running Icarus. You need Docker installed on your machine to do so.

You can build a container image with Icarus running:

docker build [--build-arg py=<python-version>] -t icarus .

where python-version is the version of Python you want to use, e.g. 3.6.

You can now spin a container giving you shell access, which you could use to poke around the container and explore the code by running:

docker run --rm -it icarus

Finally you can run any Icarus command with:

docker run icarus <COMMAND>

To run a simulation with Icarus it is advisable to mount in the container the directories where the config file is located and where you intend to store results and access them from the container.

For example, to use config.py and store the result file in the root of the project you could run the container with the following command:

docker run -v `pwd`:/data icarus icarus run -r /data/results.pickle /data/config.py

Development

Running make install creates a fully functional development environment. You can run all test cases with:

$ make test

and build HTML documentation with:

$ make doc

Citing

If you use Icarus for your paper, please refer to the following publication:

@inproceedings{icarus-simutools14,
   author = {Saino, Lorenzo and Psaras, Ioannis and Pavlou, George},
   title = {Icarus: a Caching Simulator for Information Centric Networking (ICN)},
   booktitle = {Proceedings of the 7th International ICST Conference on Simulation Tools and Techniques},
   series = {SIMUTOOLS '14},
   year = {2014},
   location = {Lisbon, Portugal},
   numpages = {10},
   publisher = {ICST},
   address = {ICST, Brussels, Belgium, Belgium},
}

Documentation

If you desire further information about Icarus, you can find it in the following places:

  • In this paper, which describes the overall architecture of the Icarus simulator, the motivations for its design, the models implemented and shows some snippets of codes on how to use the modelling tools.
  • In the API reference, which documents all packages, modules, classes, methods and functions included in the Icarus simulator.
  • In the source code, which is well organized and thoroughly documented.

Reproduce results of previous papers

Hash-routing schemes, ACM SIGCOMM ICN '13

The Icarus simulator can be used to reproduce the results and plot the graphs presented in the paper:

L.Saino, I. Psaras and G. Pavlou, Hash-routing Schemes for Information Centric Networking, in Proc. of the 3rd ACM SIGCOMM workshop on Information Centric Networking (ICN'13), Hong Kong, China, August 2013. [PDF], [BibTex]

To do so, refer to the instructions reported in the icarus-sim/hashrouting-icn13-results repository.

License

Icarus is licensed under the terms of the GNU GPLv2 license.

Contacts

Acknowledgments

This work received funding from the UK EPSRC, under grant agreement no. EP/K019589/1 (COMIT project), the EU-Japan initiative, under EU FP7 grant agreement no. 608518 and NICT contract no. 167 (GreenICN project) and from the EU FP7 program, under grant agreements 318488 (Flamingo Network of Excellence project).

icarus's People

Contributors

lorenzosaino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

icarus's Issues

about the bar chart

In your example,you have set the bar chart title, however, there's no title in the bar chart

Apportionment function produces `TypeError: integer argument expected, got float`

https://github.com/icarus-sim/icarus/blob/master/icarus/util.py#L742

Try for example apportionment(99, [0.2,0.7,0.1])

The root cause is that divmod returns floats, not ints. You can cast the items in the ints list to ints or just cast to_alloc to an int.

Code:

idx = heapq.nlargest(to_alloc, range(len(remainders)), remainders.__getitem__)

Result:

  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/heapq.py", line 470, in nlargest
    result = _nlargest(n, it)
TypeError: integer argument expected, got float

Problem during Installing icarus

After installing the latest version of networkx, error shows:

fnss 0.9.0 requires networkx<=2.4,>=2.0, but you'll have networkx 2.5 which is incompatible.
icarus 0.7.0 requires networkx<2.0,>=1.6, but you'll have networkx 2.5 which is incompatible.

If I install networkx==1.11 from make then it shows :

fnss 0.9.0 requires networkx<=2.4,>=2.0, but you'll have networkx 1.11 which is incompatible.

Need help badly :(

How to generate a dataset for content popularity and run simulations with our own algorithm

Hi,
My name is Madhu. I am currently working on a research paper based on 'content popularity prediction and caching in fog nodes'. One of the reference papers has used the Icarus tool for simulation.

I would like to know the process of

  1. How to generate a dataset for the content popularity prediction using Icarus
  2. How to use our own algorithm (deep neural network in my case) to predict the popularity.

Kindly help me with this issue. Thanks a lot in advance.

Problem in running simulation examples

Hello, I am trying to execute the simulation examples. However, I ended up with the following error:

~/Downloads/icarus-0.7.0/examples/lce-vs-probcache$ icarus run --results results.pickle config.py
[16:05:07 2018-12-03|WARNING|main] RESULTS_FORMAT setting not specified. Set to PICKLE
[16:05:07 2018-12-03|WARNING|main] LOG_LEVEL setting not specified. Set to INFO
[16:05:07 2018-12-03|INFO|main] Launching orchestrator
[16:05:07 2018-12-03|INFO|orchestration] Starting simulations: 2 experiments, 1 process(es)
[16:05:07 2018-12-03|ERROR|runner-MainProcess] Experiment 1/2 | Failed | IOError: 
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/icarus-0.7.0-py2.7.egg/icarus/orchestration.py", line 215, in run_scenario
    topology = TOPOLOGY_FACTORY[topology_name](**topology_spec)
  File "/usr/local/lib/python2.7/dist-packages/icarus-0.7.0-py2.7.egg/icarus/scenarios/topology.py", line 730, in topology_rocketfuel_latency
    topology = fnss.parse_rocketfuel_isp_latency(f_topo).to_undirected()
  File "/usr/local/lib/python2.7/dist-packages/fnss-0.8.2-py2.7.egg/fnss/topologies/parsers.py", line 199, in parse_rocketfuel_isp_latency
    with open(latencies_path, "r") as f:
IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/icarus-0.7.0-py2.7.egg/resources/topologies/rocketfuel-latency/1221/latencies.intra'

[16:05:07 2018-12-03|ERROR|runner-MainProcess] Experiment 2/2 | Failed | IOError: 
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/icarus-0.7.0-py2.7.egg/icarus/orchestration.py", line 215, in run_scenario
    topology = TOPOLOGY_FACTORY[topology_name](**topology_spec)
  File "/usr/local/lib/python2.7/dist-packages/icarus-0.7.0-py2.7.egg/icarus/scenarios/topology.py", line 730, in topology_rocketfuel_latency
    topology = fnss.parse_rocketfuel_isp_latency(f_topo).to_undirected()
  File "/usr/local/lib/python2.7/dist-packages/fnss-0.8.2-py2.7.egg/fnss/topologies/parsers.py", line 199, in parse_rocketfuel_isp_latency
    with open(latencies_path, "r") as f:
IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/icarus-0.7.0-py2.7.egg/resources/topologies/rocketfuel-latency/1221/latencies.intra'

[16:05:07 2018-12-03|INFO|orchestration] END | Planned: 2, Completed: 2, Succeeded: 0, Failed: 2
[16:05:07 2018-12-03|INFO|main] Orchestrator finished
[16:05:07 2018-12-03|INFO|main] Saved results to file /home/boubakr/Downloads/icarus-0.7.0/examples/lce-vs-probcache/results.pickle

Problem in running PyResonance

I had installed PyResonance and related packages as per Github.
When i try to run PyResonance i get an error as follows:

mininet@mininet-vm:~/pyretic$ pyretic.py pyretic.pyresonance.main --config=./pyretic/pyresonance/global.config --mode=manual

*** Specified Modules are: ***

pyretic.pyresonance.apps.auth (auth)

pyretic.pyresonance.apps.ids (ids)

*** The Policy Composition is: ***
auth >> ids

start-frenetic.sh: line 5: ./frenetic: No such file or directory
POX 0.2.0 (carp) / Copyright 2011-2013 James McCauley, et al.
Connected to pyretic frontend.
INFO:core:POX 0.2.0 (carp) is up.
INFO:openflow.of_01:[00-00-00-00-00-01 3] connected
INFO:openflow.of_01:[00-00-00-00-00-03 1] connected
INFO:openflow.of_01:[00-00-00-00-00-02 2] connected
Exception in thread Thread-5:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in **bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(_self.__args, *_self.__kwargs)
File "/home/mininet/pyretic/pyretic/core/runtime.py", line 2326, in f
self.runtime.handle_network_change()
File "/home/mininet/pyretic/pyretic/core/runtime.py", line 465, in handle_network_change
self.update_switch_classifiers()
File "/home/mininet/pyretic/pyretic/core/runtime.py", line 553, in update_switch_classifiers
classifier = self.whole_policy_compile()
File "/home/mininet/pyretic/pyretic/evaluations/stat.py", line 158, in profiled_func
res = func(_args, _kwargs)
File "/home/mininet/pyretic/pyretic/evaluations/stat.py", line 109, in profiled_func
res = func(_args, _kwargs)
File "/home/mininet/pyretic/pyretic/core/runtime.py", line 514, in whole_policy_compile
p = cp.netkat_compile(self.sw_cnt())[0] # directly compile with netkat
File "/home/mininet/pyretic/pyretic/core/language.py", line 186, in netkat_compile
server_port=server_port)
File "/home/mininet/pyretic/pyretic/core/netkat.py", line 158, in generate_classifier
(cls_json, ctime) = httplib_channel_compilation(pol)
File "/home/mininet/pyretic/pyretic/core/netkat.py", line 126, in httplib_channel_compilation
json_input = compile_to_netkat(pol)
File "/home/mininet/pyretic/pyretic/core/netkat.py", line 494, in compile_to_netkat
return json.dumps(to_pol(pyretic_pol))
File "/home/mininet/pyretic/pyretic/core/netkat.py", line 423, in to_pol
from pyretic.evaluations.Tests.common_modules.stanford_forwarding import StanfordForwarding
File "/home/mininet/pyretic/pyretic/evaluations/Tests/__init
.py", line 6, in
module = loader.find_module(module_name).load_module(module_name)
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/mininet/pyretic/pyretic/evaluations/Tests/congested_link/init.py", line 6, in
module = loader.find_module(module_name).load_module(module_name)
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/mininet/pyretic/pyretic/evaluations/Tests/congested_link/Topos/init.py", line 6, in
module = loader.find_module(module_name).load_module(module_name)
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/mininet/pyretic/pyretic/evaluations/Tests/congested_link/Topos/FatTree.py", line 1, in
import fnss
ImportError: No module named fnss

MacOS : dlopen ( gpivpi.vpl, 0x0009): symbol not found in flat namespace '_PyErr_Print'. #3018

I am trying to run icarus with cocotb and get the following error. Due to 'vpl' I was thinking its probably coming from icarus.
Can someone please help

/opt/homebrew/bin/vvp -M /opt/homebrew/lib/python3.9/site-packages/cocotb/share/makefiles/build/libs/arm64 -m gpivpi sim_build/sim.vvp   
gpivpi:`/opt/homebrew/lib/python3.9/site-packages/cocotb/share/makefiles/build/libs/arm64/gpivpi.vpl' failed to open using dlopen() because:
    dlopen(/opt/homebrew/lib/python3.9/site-packages/cocotb/share/makefiles/build/libs/arm64/gpivpi.vpl, 0x0009): symbol not found in flat namespace '_PyErr_Print'.

thanks

Icarus plot

Dr. Lorenzo

i am trying to plot the results from txt file in Icarus. I dont understand what will i do? please help me out.
i am very thankful.

Strategy extension

Hi,

Sorry for bothering you, this is my second question, I'd like to do an experiment for RL-based caching strategy, so I need to modify write a new class for the new RL-based strategy, do I need to run "make install" again when I add the new class to "policies.py"?

Or could you give me some instructions on how to modify it if there is a simpler method?

Good day, sir!

Error when using PERFECT_LFU cache policy and some strategy along with ttl_cache function

Hello
I get the following error when I use the following PERFECT LFU cache policy together with the ttl_cache function and increase the following parameters.This problem exists on most of the existing strategies (such as CL4M)
params

N_WARMUP_REQUESTS = 1* 10 ** 3    --to-->  N_WARMUP_REQUESTS = 6* 10 ** 4
N_MEASURED_REQUESTS = 1* 10 ** 3    ----to--->   N_MEASURED_REQUESTS = 6* 10 ** 4

error
ERROR|orchestration] FAILURE | Experiment failed: list index out of range

a small error in examples

Hello,
As i was trying to run on path vs off path experiments, there was an error about not being able to draw the plots. I think there is a problem in makefile and
plot: check_icarus_installed
should change to
plot: check_installed
is it right?

accessing link load

Hello,
i'm trying to write a new strategy for caching and i need link load for my computation, i'm a little confused, can you help me how to use it in on path class? i don't know if i can use the collectors class or not? :(
i really appreciate it if you could give me a hint
thanks

always_ff, always_comb

Hi,

I'm getting errors with always_ff, always_comb in icarus.
Can I please check if these are not yet supported by icarus?
If there are, what could I be doing wrong?

Thanks

Is it possible to run the workload in parallel?

From what I know so far, all events are added to the workload and executed serially one by one. Is it possible to change it to simulate multiple parallel requests as it usually happens in real-world?

I had another question about the file size, currently it assumes that all files are of unit length. I plan to add another attribute called file size and make the necessary changes to the caching policies. Is there any other part of the code that I need to take care of to implement this change?

Problems with cacheplacement scenario (DEGREE and BETWEENNESS_CENTRALITY methods)

Hello Sir,

Firstly, a thousand thanks for providing this powerful tool for cache simulation. But during use, we found possible problems in the cache placement scenario (DEGREE and BETWEENNESS_CENTRALITY methods).

In DEGREE, the source code calculates and sums the degree of all nodes, however, only nodes from 'icr_candidates' are allocated cache budget. This will result in the cache budget not being fully allocated. Same thing in BETWEENNESS_CENTRALITY.

Some topologies got the wrong allocating result (like TISCALI and GEANT), some are right (like GARR).

Am I misunderstanding something? Looking forward to your response.

How to read

Dr. Lorenzo

thank so much for reply on the ICN Mailing-list. Anyway I have tried your instructions and this is what I get:
abdou@sdn-ccn:~/icarus$ python scripts/printresults.py results.pickle > results.txt
Traceback (most recent call last):
File "scripts/printresults.py", line 8, in
from icarus.registry import RESULTS_READER
ImportError: No module named icarus.registry

See if you can still help, thank you and sorry for bothering you.

Abdou Darboe
Wireless Internet Service Engineering Lab
NDHU, Hualien.
Taiwan, ROC

Failed to run some hash routing strategies

Hello Sir,
I am facing some problems with running 'HR_EDGE_CACHE', 'HR_ON_PATH' and 'HR_CLUSTER' strategies which are not shown in the examples. When I try to run any of these strategies, the error shows :
ERROR|orchestration] FAILURE | Experiment failed: list index out of range

I have assigned 'MULTICAST' for 'HR_EDGE_CACHE', 'HR_ON_PATH' and 'HR_CLUSTER'.

Here is my errors, config and hashrouting files. Kindly have a look.
Errors.txt
config.txt
hashrouting.txt

Am I missing something? It will be great if you help me out, sir!

Support for assign statements

Hi,

May I check whether you have a limitation on assign statements for version 0.9.7 and 0.9.8 of icarus?
Seems like assigns work only when constant values are assigned.

Thanks

Support fora assign statements 0.9.x

Hi,

May I check whether you have a limitation on assign statements for version 0.9.7 and 0.9.8 of icarus?
Seems like assigns work only when constant values are assigned.

Thanks

Error display when increasing some parameters

Hello, I am facing an error when I increase the following parameters:
(I implemented these parameters on my strategy)

params

N_WARMUP_REQUESTS = 1* 10 ** 3    --to---> N_WARMUP_REQUESTS = 6* 10 ** 4
N_MEASURED_REQUESTS = 1* 10 ** 3    ----to-----> N_MEASURED_REQUESTS = 6* 10 ** 4
NETWORK_CACHE = [0.01,0.02,0.03]   -----to----> NETWORK_CACHE = [0.01,0.015,0.02,0.025,0.03]

error:

[00:23:05 2023-07-04|INFO|runner-ForkPoolWorker-3] Experiment 25/72 | Start simulation
[00:23:12 2023-07-04|ERROR|orchestration] FAILURE | Experiment failed: list index out of range

Error after completion of simulation

After the completion of simulation in ubuntu there was error as
IOError: [Errno 13] Permission denied: 'results.pickle'
any help why this error occurs?

Inquiry regarding the Icarus simulator

Dear Sir,

Thank you for providing us with such a powerful tool for developing caching strategies in the ICN environment. Sir, as I am new to the Icarus tool, I have some queries, which I have listed below. I understand that you are very busy, but I would like to request that you please resolve my concerns, for which I am grateful.

  1. Is it possible to construct NDN Interest and Data packet frameworks, as well as CS, PIT, and FIB data structures, and if so, how?
  2. How to calculate RTT among nodes, is RTT function can be implemented in collector.py file?
  3. How to convert a result.pickle file into a result.txt file, as well as how to use the visualise module to draw a graph?

Thanks and Regards
Pankaj

Dividing a cache

Hi,
Is there a way to split multiple parts of the cache in isolation for its own kind of queries? For example, one half serves queries according to Zipf's law with alpha = 1, and the other half Zipf's law with alpha = 0.8. The closest thing to this is SLRU, but in this policy the cache parts are not isolated.
Is it possible to serve several kinds of queries (as if from several users) to the cache system in general within the simulation?
Thank you very much in advance

Error of running the examples

Hi,

When I try to run the examples in the example folder (lce-vs-probcache) with command "icarus run --results test.pickle config.py", I got this error:

Traceback (most recent call last):
File "/zijia/RL-NDN/Icarus/icarus/icarus/scenarios/workload.py", line 121, in iter
raise StopIteration()
StopIteration

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

Traceback (most recent call last):
File "/zijia/RL-NDN/Icarus/icarus/icarus/orchestration.py", line 279, in run_scenario
results = exec_experiment(topology, workload, netconf, strategy, cache_policy, collectors)
File "/zijia/RL-NDN/Icarus/icarus/icarus/execution/engine.py", line 59, in exec_experiment
for time, event in workload:
RuntimeError: generator raised StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/conda/bin/icarus", line 33, in
sys.exit(load_entry_point('icarus', 'console_scripts', 'icarus')())
File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/zijia/RL-NDN/Icarus/icarus/icarus/main.py", line 42, in run
icarus.run(config, results, config_override)
File "/zijia/RL-NDN/Icarus/icarus/icarus/runner.py", line 112, in run
orch.run()
File "/zijia/RL-NDN/Icarus/icarus/icarus/orchestration.py", line 126, in run
self.n_exp))
File "/zijia/RL-NDN/Icarus/icarus/icarus/orchestration.py", line 289, in run_scenario
err_type = str(type(e)).split("'")[1].split(".")[1]
IndexError: list index out of range

Also, when I run offpath-vs-onpath-caching example, I got something like this:

[06:30:59 2020-07-02|INFO|runner-ForkPoolWorker-7] Experiment 251/1536 | Start simulation
[06:30:59 2020-07-02|ERROR|orchestration] FAILURE | Experiment failed: list index out of range
[06:30:59 2020-07-02|ERROR|orchestration] FAILURE | Experiment failed: list index out of range
[06:31:00 2020-07-02|ERROR|orchestration] FAILURE | Experiment failed: list index out of range

Could you tell me what should I do to fix this issue? Thank you!

Issue while running the simulation

  • Hello, I am facing this issue while running the simulation, could you guide me through it on running a simulation on windows

(icarus) D:\icarus>icarus run --results results.pkl config.py
Traceback (most recent call last):
File "G:\envs\icarus\Scripts\icarus-script.py", line 11, in
load_entry_point('icarus==0.8.0', 'console_scripts', 'icarus')()
File "G:\envs\icarus\lib\site-packages\click-8.0.0a1-py3.8.egg\click\core.py", line 1025, in call
return self.main(*args, **kwargs)
File "G:\envs\icarus\lib\site-packages\click-8.0.0a1-py3.8.egg\click\core.py", line 955, in main
rv = self.invoke(ctx)
File "G:\envs\icarus\lib\site-packages\click-8.0.0a1-py3.8.egg\click\core.py", line 1517, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "G:\envs\icarus\lib\site-packages\click-8.0.0a1-py3.8.egg\click\core.py", line 1279, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "G:\envs\icarus\lib\site-packages\click-8.0.0a1-py3.8.egg\click\core.py", line 710, in invoke
return callback(*args, **kwargs)
File "G:\envs\icarus\lib\site-packages\icarus-0.8.0-py3.8.egg\icarus\main.py", line 42, in run
icarus.run(config, results, config_override)
File "G:\envs\icarus\lib\site-packages\icarus-0.8.0-py3.8.egg\icarus\runner.py", line 109, in run
for sig in (signal.SIGTERM, signal.SIGINT, signal.SIGHUP, signal.SIGQUIT, signal.SIGABRT):
AttributeError: module 'signal' has no attribute 'SIGHUP'

Run simulations with different content placement algorithms

Hi Lorenzo,

I'd like to run experiments, but using different content placement algorithms in cache nodes. I'll describe what I'm trying to do:

Obs: I'm assuming that each content request is composed of a list of contents and not a single one. for example: req = [1, 3, 6]. Moreover, each request may be variable-length or fixed-length.

1 - Collect a data-set containing content requests used in a sample experiment.
2 - Split the data-set into training and test. In the training one, I intend to find out patterns in such requests in order to perform a content placement based on them. Once the patterns are found, my proposal, in an off-line manner, places these content on cache nodes. So, my network.py file would be like this:

 policy_name = cache_policy['name']
        policy_args = {k: v for k, v in cache_policy.items() if k != 'name'}
        # The actual cache objects storing the content
        self.cache = {node: CACHE_POLICY[policy_name](cache_size[node], **policy_args)
                          for node in `cache_size}`
       for node in self.cache:
            contents = [
                           [1,2,3],
                           [4,5],
                           [5,6,7,8]
                             ]
             for content in contents:
                    self.cache[node].put_contents(random.choice(contents))

3 - At the test phase, the content requests are performed, but now having already placed the contents found in the training phase and compare the results with the other available proposals.

I'm having some problems during simulation because when engine.py gets the NetworModel from network.py file to be used on the simulation, all the policies to be evaluated will use the same content allocation (in this case, the one I obtained in the training phase and described above). What I'd like to have is that my proposal would use its own NetworkModel, with its own content allocation scheme, and the other proposal would use the baseline one, provided on Icarus.

I tried to design two different NetworkModels on network.py to be used by engine.py, but didn't work. Follow is a sample of my code:

obs: I replaced strategy by policy, but it is not the cache policy itself.

def exec_experiment(topology, workload, netconf, policy, cache_policy, collectors):

    model_baseline = NetworkModelBaseLine(topology, cache_policy, **netconf)
    model_proposal = NetworkModelProposal(topology, cache_policy, **netconf)
    view_baseline = NetworkViewBaseLine(model_baseline)
    view_proposal = NetworkViewProposal(model_proposal)
    controller_baseline = NetworkController(model_baseline)
    controller_proposal = NetworkController(model_proposal)


    collectors_inst_baseline = [DATA_COLLECTOR[name](view_baseline, **params)
                       for name, params in collectors.items()]
    collector_baseline = CollectorProxy(view_baseline, collectors_inst_baseline)
    controller_baseline.attach_collector(collector_baseline)

    policy_name_baseline = policy['name']
    policy_args_baseline = {k: v for k, v in policy_baseline.items() if k != 'name'  and policy_name_baseline == 'SAMPLE_POLICY'}
    policy_inst_baseline = POLICY[policy_name_baseline](view_baseline, controller_baseline, **policy_args_baseline)

    collectors_inst_proposal = [DATA_COLLECTOR[name](view_proposal, **params)
                                for name, params in collectors.items()]
    collector_proposal = CollectorProxy(view_proposal, collectors_inst_proposal)
    controller_proposal.attach_collector(collector_proposal)

    policy_name_proposal = policy_proposal['name']
    policy_args_proposal = {k: v for k, v in policy_proposal.items() if k != 'name' and policy_name_proposal== 'PROPOSAL'}
    policy_inst_proposal = POLICY[policy_name_proposal](view_proposal, controller_proposal, **policy_args_proposal)

    for time, event in workload:
         policy_inst_baseline.process_event(time, **event)
         policy_inst_proposal.process_event(time, **event)
    return collector_baseline.results(), collector_proposal.results()

Could you please help me how to make each policy uses its corresponding NetworkModel and run with the correct scenario?

Best Regards,

Igor.

Error for running simulation examples

Hello, I'm working on my master thesis and i'm going to try a new caching strategy with icarus, as to begin i try to run the examples but it's giving me the error that icarus is not installed, although it has been installed. i really appreciate if you can help me.
screenshot from 2019-02-11 04-28-32

To make content-based replication

Dr.Lorenzo

Thank you for providing me with great tools related to ICN.
I'm studying for caching algorithm in ICN especially content-based replication

In your paper, you mentioned that your ICN research are all cache-or node- based.
Is there any way to change it into content-based replication?

I'm sorry if it's an immature question because I'm not familiar with

thank you!

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.