icarus.models.strategy package

Submodules

icarus.models.strategy.base module

Implementations of base strategies

class Strategy(view, controller, **kwargs)[source]

Bases: object

Base strategy imported by all other strategy classes

Methods

process_event(time, receiver, content, log) Process an event received from the simulation engine.
process_event(time, receiver, content, log)[source]

Process an event received from the simulation engine.

This event is processed by executing relevant actions of the network controller, potentially based on the current status of the network retrieved from the network view.

Parameters:
time : int

The timestamp of the event

receiver : any hashable type

The receiver node requesting a content

content : any hashable type

The content identifier requested by the receiver

log : bool

Indicates whether the event must be registered by the data collectors attached to the network.

class NoCache(view, controller, **kwargs)[source]

Bases: icarus.models.strategy.base.Strategy

Strategy without any caching

This corresponds to the traffic in a normal TCP/IP network without any CDNs or overlay caching, where all content requests are served by the original source.

Methods

process_event(time, receiver, content, log) Process an event received from the simulation engine.
name = 'NO_CACHE'
process_event(time, receiver, content, log)[source]

Process an event received from the simulation engine.

This event is processed by executing relevant actions of the network controller, potentially based on the current status of the network retrieved from the network view.

Parameters:
time : int

The timestamp of the event

receiver : any hashable type

The receiver node requesting a content

content : any hashable type

The content identifier requested by the receiver

log : bool

Indicates whether the event must be registered by the data collectors attached to the network.

icarus.models.strategy.hashrouting module

Implementations of all hash-routing strategies

class Hashrouting(view, controller, routing, **kwargs)[source]

Bases: icarus.models.strategy.hashrouting.BaseHashrouting

Unified implementation of the three basic hash-routing schemes: symmetric, asymmetric and multicast.

Hash-routing implementations are described in [1].

According to these strategies, edge nodes receiving a content request compute a hash function mapping the content identifier to a specific caching node and forward the request to that specific node. If the cache holds the requested content, it is returned to the user, otherwise it is forwarded to the original source. Similarly, when a content is delivered to the requesting user, it can be cached only by the caching node associated to the content identifier by the hash function.

References

[1](1, 2) L. Saino, I. Psaras and G. Pavlou, Hash-routing Schemes for Information-Centric Networking, in Proceedings of ACM SIGCOMM ICN‘13 workshop. Available: https://lorenzosaino.github.io/publications/hashrouting-icn13.pdf
[2]L. Saino, On the Design of Efficient Caching Systems, Ph.D. thesis University College London, Dec. 2015. Available: http://discovery.ucl.ac.uk/1473436/

Methods

authoritative_cache(content[, cluster]) Return the authoritative cache node for the given content
process_event(time, receiver, content, log) Process an event received from the simulation engine.
name = 'HASHROUTING'
process_event(time, receiver, content, log)[source]

Process an event received from the simulation engine.

This event is processed by executing relevant actions of the network controller, potentially based on the current status of the network retrieved from the network view.

Parameters:
time : int

The timestamp of the event

receiver : any hashable type

The receiver node requesting a content

content : any hashable type

The content identifier requested by the receiver

log : bool

Indicates whether the event must be registered by the data collectors attached to the network.

class HashroutingEdge(view, controller, routing, edge_cache_ratio, **kwargs)[source]

Bases: icarus.models.strategy.hashrouting.BaseHashrouting

Hybrid hash-routing and edge caching.

According to this strategy a fraction of the caching space in each cache is reserved for local caching. When a request is issued by a user, it is routed to the closes caching node and this caching node holds a copy of requested content in its local cache even if not authoritative for the requested content.

Here we assume that each receiver is directly connected to one gateway, which is on the path to all other caches.

References

[2]L. Saino, On the Design of Efficient Caching Systems, Ph.D. thesis University College London, Dec. 2015. Available: http://discovery.ucl.ac.uk/1473436/

Methods

authoritative_cache(content[, cluster]) Return the authoritative cache node for the given content
process_event(time, receiver, content, log) Process an event received from the simulation engine.
name = 'HR_EDGE_CACHE'
process_event(time, receiver, content, log)[source]

Process an event received from the simulation engine.

This event is processed by executing relevant actions of the network controller, potentially based on the current status of the network retrieved from the network view.

Parameters:
time : int

The timestamp of the event

receiver : any hashable type

The receiver node requesting a content

content : any hashable type

The content identifier requested by the receiver

log : bool

Indicates whether the event must be registered by the data collectors attached to the network.

class HashroutingOnPath(view, controller, routing, on_path_cache_ratio, **kwargs)[source]

Bases: icarus.models.strategy.hashrouting.BaseHashrouting

Hybrid hash-routing and on-path caching.

This strategy differs from HashroutingEdge for the fact that in HashroutingEdge, the local fraction of the cache is queried only by traffic of endpoints directly attached to the caching node. In HashroutingOnPath the local cache is queried by all traffic being forwarded by the node.

References

[2]L. Saino, On the Design of Efficient Caching Systems, Ph.D. thesis University College London, Dec. 2015. Available: http://discovery.ucl.ac.uk/1473436/

Methods

authoritative_cache(content[, cluster]) Return the authoritative cache node for the given content
process_event(time, receiver, content, log) Process an event received from the simulation engine.
name = 'HR_ON_PATH'
process_event(time, receiver, content, log)[source]

Process an event received from the simulation engine.

This event is processed by executing relevant actions of the network controller, potentially based on the current status of the network retrieved from the network view.

Parameters:
time : int

The timestamp of the event

receiver : any hashable type

The receiver node requesting a content

content : any hashable type

The content identifier requested by the receiver

log : bool

Indicates whether the event must be registered by the data collectors attached to the network.

class HashroutingClustered(view, controller, intra_routing, inter_routing='LCE', **kwargs)[source]

Bases: icarus.models.strategy.hashrouting.BaseHashrouting

Hash-routing with clustering of the network.

According to ths strategy, nodes of the network are divided in a number of clusters and hash-routing is used withing each of this clusters. In case of cache miss at a cluster, requests are forwarded to other clusters on the path to the original source.

References

[2]L. Saino, On the Design of Efficient Caching Systems, Ph.D. thesis University College London, Dec. 2015. Available: http://discovery.ucl.ac.uk/1473436/

Methods

authoritative_cache(content[, cluster]) Return the authoritative cache node for the given content
process_event(time, receiver, content, log) Process an event received from the simulation engine.
name = 'HR_CLUSTER'
process_event(time, receiver, content, log)[source]

Process an event received from the simulation engine.

This event is processed by executing relevant actions of the network controller, potentially based on the current status of the network retrieved from the network view.

Parameters:
time : int

The timestamp of the event

receiver : any hashable type

The receiver node requesting a content

content : any hashable type

The content identifier requested by the receiver

log : bool

Indicates whether the event must be registered by the data collectors attached to the network.

class HashroutingSymmetric(view, controller, **kwargs)[source]

Bases: icarus.models.strategy.hashrouting.Hashrouting

Hash-routing with symmetric routing (HR SYMM)

According to this strategy, each content is routed following the same path of the request.

References

[1]L. Saino, I. Psaras and G. Pavlou, Hash-routing Schemes for Information-Centric Networking, in Proceedings of ACM SIGCOMM ICN‘13 workshop. Available: https://lorenzosaino.github.io/publications/hashrouting-icn13.pdf
[2]L. Saino, On the Design of Efficient Caching Systems, Ph.D. thesis University College London, Dec. 2015. Available: http://discovery.ucl.ac.uk/1473436/

Methods

authoritative_cache(content[, cluster]) Return the authoritative cache node for the given content
process_event(time, receiver, content, log) Process an event received from the simulation engine.
name = 'HR_SYMM'
class HashroutingAsymmetric(view, controller, **kwargs)[source]

Bases: icarus.models.strategy.hashrouting.Hashrouting

Hash-routing with asymmetric routing (HR ASYMM)

According to this strategy, each content fetched from an original source, as a result of a cache miss, is routed towards the receiver following the shortest path. If the authoritative cache is on the path, then it caches the content, otherwise not.

References

[1]L. Saino, I. Psaras and G. Pavlou, Hash-routing Schemes for Information-Centric Networking, in Proceedings of ACM SIGCOMM ICN‘13 workshop. Available: https://lorenzosaino.github.io/publications/hashrouting-icn13.pdf
[2]L. Saino, On the Design of Efficient Caching Systems, Ph.D. thesis University College London, Dec. 2015. Available: http://discovery.ucl.ac.uk/1473436/

Methods

authoritative_cache(content[, cluster]) Return the authoritative cache node for the given content
process_event(time, receiver, content, log) Process an event received from the simulation engine.
name = 'HR_ASYMM'
class HashroutingMulticast(view, controller, **kwargs)[source]

Bases: icarus.models.strategy.hashrouting.Hashrouting

Hash-routing implementation with multicast delivery of content packets.

In this strategy, if there is a cache miss, when contents return in the domain, they are multicast. One copy is sent to the authoritative cache and the other to the receiver. If the cache is on the path from source to receiver, this strategy behaves as a normal symmetric hash-routing strategy.

References

[1]L. Saino, I. Psaras and G. Pavlou, Hash-routing Schemes for Information-Centric Networking, in Proceedings of ACM SIGCOMM ICN‘13 workshop. Available: https://lorenzosaino.github.io/publications/hashrouting-icn13.pdf
[2]L. Saino, On the Design of Efficient Caching Systems, Ph.D. thesis University College London, Dec. 2015. Available: http://discovery.ucl.ac.uk/1473436/

Methods

authoritative_cache(content[, cluster]) Return the authoritative cache node for the given content
process_event(time, receiver, content, log) Process an event received from the simulation engine.
name = 'HR_MULTICAST'
class HashroutingHybridAM(view, controller, max_stretch=0.2, **kwargs)[source]

Bases: icarus.models.strategy.hashrouting.BaseHashrouting

Hash-routing implementation with hybrid asymmetric-multicast delivery of content packets.

In this strategy, if there is a cache miss, when content packets return in the domain, the packet is delivered to the receiver following the shortest path. If the additional number of hops required to send a copy to the authoritative cache is below a specific fraction of the network diameter, then one copy is sent to the authoritative cache as well. If the cache is on the path from source to receiver, this strategy behaves as a normal symmetric hash-routing strategy.

References

[1]L. Saino, I. Psaras and G. Pavlou, Hash-routing Schemes for Information-Centric Networking, in Proceedings of ACM SIGCOMM ICN‘13 workshop. Available: https://lorenzosaino.github.io/publications/hashrouting-icn13.pdf

Methods

authoritative_cache(content[, cluster]) Return the authoritative cache node for the given content
process_event(time, receiver, content, log) Process an event received from the simulation engine.
name = 'HR_HYBRID_AM'
process_event(time, receiver, content, log)[source]

Process an event received from the simulation engine.

This event is processed by executing relevant actions of the network controller, potentially based on the current status of the network retrieved from the network view.

Parameters:
time : int

The timestamp of the event

receiver : any hashable type

The receiver node requesting a content

content : any hashable type

The content identifier requested by the receiver

log : bool

Indicates whether the event must be registered by the data collectors attached to the network.

class HashroutingHybridSM(view, controller, **kwargs)[source]

Bases: icarus.models.strategy.hashrouting.BaseHashrouting

Hash-routing implementation with hybrid symmetric-multicast delivery of content packets.

In this implementation, the edge router receiving a content packet decides whether to deliver the packet using multicast or symmetric hash-routing based on the total cost for delivering the Data to both cache and receiver in terms of hops.

References

[1]L. Saino, I. Psaras and G. Pavlou, Hash-routing Schemes for Information-Centric Networking, in Proceedings of ACM SIGCOMM ICN‘13 workshop. Available: https://lorenzosaino.github.io/publications/hashrouting-icn13.pdf

Methods

authoritative_cache(content[, cluster]) Return the authoritative cache node for the given content
process_event(time, receiver, content, log) Process an event received from the simulation engine.
name = 'HR_HYBRID_SM'
process_event(time, receiver, content, log)[source]

Process an event received from the simulation engine.

This event is processed by executing relevant actions of the network controller, potentially based on the current status of the network retrieved from the network view.

Parameters:
time : int

The timestamp of the event

receiver : any hashable type

The receiver node requesting a content

content : any hashable type

The content identifier requested by the receiver

log : bool

Indicates whether the event must be registered by the data collectors attached to the network.

icarus.models.strategy.offpath module

Implementations of all off-path strategies

class NearestReplicaRouting(view, controller, metacaching, implementation='ideal', radius=4, **kwargs)[source]

Bases: icarus.models.strategy.base.Strategy

Ideal Nearest Replica Routing (NRR) strategy.

In this strategy, a request is forwarded to the topologically closest node holding a copy of the requested item. This strategy is ideal, as it is implemented assuming that each node knows the nearest replica of a content without any signaling

On the return path, content can be caching according to a variety of metacaching policies. LCE and LCD are currently supported.

Methods

process_event(time, receiver, content, log) Process an event received from the simulation engine.
name = 'NRR'
process_event(time, receiver, content, log)[source]

Process an event received from the simulation engine.

This event is processed by executing relevant actions of the network controller, potentially based on the current status of the network retrieved from the network view.

Parameters:
time : int

The timestamp of the event

receiver : any hashable type

The receiver node requesting a content

content : any hashable type

The content identifier requested by the receiver

log : bool

Indicates whether the event must be registered by the data collectors attached to the network.

icarus.models.strategy.onpath module

Implementations of all on-path strategies

class Partition(view, controller)[source]

Bases: icarus.models.strategy.base.Strategy

Partition caching strategy.

In this strategy the network is divided into as many partitions as the number of caching nodes and each receiver is statically mapped to one and only one caching node. When a request is issued it is forwarded to the cache mapped to the receiver. In case of a miss the request is routed to the source and then returned to cache, which will store it and forward it back to the receiver.

This requires median cache placement, which optimizes the placement of caches for this strategy.

This strategy is normally used with a small number of caching nodes. This is the the behaviour normally adopted by Network CDN (NCDN). Google Global Cache (GGC) operates this way.

Methods

process_event(time, receiver, content, log) Process an event received from the simulation engine.
name = 'PARTITION'
process_event(time, receiver, content, log)[source]

Process an event received from the simulation engine.

This event is processed by executing relevant actions of the network controller, potentially based on the current status of the network retrieved from the network view.

Parameters:
time : int

The timestamp of the event

receiver : any hashable type

The receiver node requesting a content

content : any hashable type

The content identifier requested by the receiver

log : bool

Indicates whether the event must be registered by the data collectors attached to the network.

class Edge(view, controller)[source]

Bases: icarus.models.strategy.base.Strategy

Edge caching strategy.

In this strategy only a cache at the edge is looked up before forwarding a content request to the original source.

In practice, this is like an LCE but it only queries the first cache it finds in the path. It is assumed to be used with a topology where each PoP has a cache but it simulates a case where the cache is actually further down the access network and it is not looked up for transit traffic passing through the PoP but only for PoP-originated requests.

Methods

process_event(time, receiver, content, log) Process an event received from the simulation engine.
name = 'EDGE'
process_event(time, receiver, content, log)[source]

Process an event received from the simulation engine.

This event is processed by executing relevant actions of the network controller, potentially based on the current status of the network retrieved from the network view.

Parameters:
time : int

The timestamp of the event

receiver : any hashable type

The receiver node requesting a content

content : any hashable type

The content identifier requested by the receiver

log : bool

Indicates whether the event must be registered by the data collectors attached to the network.

class LeaveCopyEverywhere(view, controller, **kwargs)[source]

Bases: icarus.models.strategy.base.Strategy

Leave Copy Everywhere (LCE) strategy.

In this strategy a copy of a content is replicated at any cache on the path between serving node and receiver.

Methods

process_event(time, receiver, content, log) Process an event received from the simulation engine.
name = 'LCE'
process_event(time, receiver, content, log)[source]

Process an event received from the simulation engine.

This event is processed by executing relevant actions of the network controller, potentially based on the current status of the network retrieved from the network view.

Parameters:
time : int

The timestamp of the event

receiver : any hashable type

The receiver node requesting a content

content : any hashable type

The content identifier requested by the receiver

log : bool

Indicates whether the event must be registered by the data collectors attached to the network.

class LeaveCopyDown(view, controller, **kwargs)[source]

Bases: icarus.models.strategy.base.Strategy

Leave Copy Down (LCD) strategy.

According to this strategy, one copy of a content is replicated only in the caching node you hop away from the serving node in the direction of the receiver. This strategy is described in [2]_.

Methods

process_event(time, receiver, content, log) Process an event received from the simulation engine.
name = 'LCD'
process_event(time, receiver, content, log)[source]

Process an event received from the simulation engine.

This event is processed by executing relevant actions of the network controller, potentially based on the current status of the network retrieved from the network view.

Parameters:
time : int

The timestamp of the event

receiver : any hashable type

The receiver node requesting a content

content : any hashable type

The content identifier requested by the receiver

log : bool

Indicates whether the event must be registered by the data collectors attached to the network.

class ProbCache(view, controller, t_tw=10)[source]

Bases: icarus.models.strategy.base.Strategy

ProbCache strategy [3]_

This strategy caches content objects probabilistically on a path with a probability depending on various factors, including distance from source and destination and caching space available on the path.

This strategy was originally proposed in [2]_ and extended in [3]_. This class implements the extended version described in [3]_. In the extended version of ProbCache the :math`x/c` factor of the ProbCache equation is raised to the power of :math`c`.

References

..[2] I. Psaras, W. Chai, G. Pavlou, Probabilistic In-Network Caching for
Information-Centric Networks, in Proc. of ACM SIGCOMM ICN ‘12 Available: http://www.ee.ucl.ac.uk/~uceeips/prob-cache-icn-sigcomm12.pdf
..[3] I. Psaras, W. Chai, G. Pavlou, In-Network Cache Management and
Resource Allocation for Information-Centric Networks, IEEE Transactions on Parallel and Distributed Systems, 22 May 2014 Available: http://doi.ieeecomputersociety.org/10.1109/TPDS.2013.304

Methods

process_event(time, receiver, content, log) Process an event received from the simulation engine.
name = 'PROB_CACHE'
process_event(time, receiver, content, log)[source]

Process an event received from the simulation engine.

This event is processed by executing relevant actions of the network controller, potentially based on the current status of the network retrieved from the network view.

Parameters:
time : int

The timestamp of the event

receiver : any hashable type

The receiver node requesting a content

content : any hashable type

The content identifier requested by the receiver

log : bool

Indicates whether the event must be registered by the data collectors attached to the network.

class CacheLessForMore(view, controller, use_ego_betw=False, **kwargs)[source]

Bases: icarus.models.strategy.base.Strategy

Cache less for more strategy [4]_.

This strategy caches items only once in the delivery path, precisely in the node with the greatest betweenness centrality (i.e., that is traversed by the greatest number of shortest paths). If the argument use_ego_betw is set to True then the betweenness centrality of the ego-network is used instead.

References

..[4] W. Chai, D. He, I. Psaras, G. Pavlou, Cache Less for More in
Information-centric Networks, in IFIP NETWORKING ‘12 Available: http://www.ee.ucl.ac.uk/~uceeips/centrality-networking12.pdf

Methods

process_event(time, receiver, content, log) Process an event received from the simulation engine.
name = 'CL4M'
process_event(time, receiver, content, log)[source]

Process an event received from the simulation engine.

This event is processed by executing relevant actions of the network controller, potentially based on the current status of the network retrieved from the network view.

Parameters:
time : int

The timestamp of the event

receiver : any hashable type

The receiver node requesting a content

content : any hashable type

The content identifier requested by the receiver

log : bool

Indicates whether the event must be registered by the data collectors attached to the network.

class RandomBernoulli(view, controller, p=0.2, **kwargs)[source]

Bases: icarus.models.strategy.base.Strategy

Bernoulli random cache insertion.

In this strategy, a content is randomly inserted in a cache on the path from serving node to receiver with probability p.

Methods

process_event(time, receiver, content, log) Process an event received from the simulation engine.
name = 'RAND_BERNOULLI'
process_event(time, receiver, content, log)[source]

Process an event received from the simulation engine.

This event is processed by executing relevant actions of the network controller, potentially based on the current status of the network retrieved from the network view.

Parameters:
time : int

The timestamp of the event

receiver : any hashable type

The receiver node requesting a content

content : any hashable type

The content identifier requested by the receiver

log : bool

Indicates whether the event must be registered by the data collectors attached to the network.

class RandomChoice(view, controller, **kwargs)[source]

Bases: icarus.models.strategy.base.Strategy

Random choice strategy

This strategy stores the served content exactly in one single cache on the path from serving node to receiver selected randomly.

Methods

process_event(time, receiver, content, log) Process an event received from the simulation engine.
name = 'RAND_CHOICE'
process_event(time, receiver, content, log)[source]

Process an event received from the simulation engine.

This event is processed by executing relevant actions of the network controller, potentially based on the current status of the network retrieved from the network view.

Parameters:
time : int

The timestamp of the event

receiver : any hashable type

The receiver node requesting a content

content : any hashable type

The content identifier requested by the receiver

log : bool

Indicates whether the event must be registered by the data collectors attached to the network.

Module contents

Implementations of all caching and routing strategies