Code Monkey home page Code Monkey logo

ofanan / access_strategies_with_staleness Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 8.08 MB

This project provides tools to simulate several access strategies for distributed caching. The simulator considers a user who is equipped by several caches, and receives from them periodical updates about the cached content. These updates are not totally accurate. The user has to select which caches to access, to obtain the requested datum in the lowest price and maximum certainty possible.

Python 23.24% Shell 0.12% ReScript 76.60% TeX 0.05%
network cache-simulator bloomfilter indicator distributed-database

access_strategies_with_staleness's Introduction

Access Strategies for Network Caching with Staleness

This project provides tools to simulate several access strategies for distributed caching. The simulator considers a user equipped with several caches, that receives periodical updates about the cached content. These updates are not totally accurate. In particular, there exist not only false-positives, but also false-negatives, due to the staleness of the indicator that the user has. The user has to select which caches to access, to obtain the requested datum at the lowest price and maximum certainty possible. For details about the problem and the algorithms used, please refer to the papers:

[1] I. Cohen, Gil Einziger, R. Friedman, and G. Scalosub, Access Strategies for Network Caching, IEEE Transactions on Networking, Vol. 29(2), 2021, pp.609-622.

[2] I. Cohen, Gil Einziger, and G. Scalosub, False Negative Awareness in Indicator-based Caching Systems, IEEE Transactions on Networking, 2022, pp. 46-56.

The source files are described below. More detailed documentation is found within the source files.

Directories

All source files are written in Python, and found in ./src.

The result files are written to ./res.

source files

runner.py

Runs a simulation, looping over all requested values of parameters (miss penalty, cache sizes, number of caches etc.).

python_simulator.py

Implements the class Simulator = a simulator that accepts system parameters (trace, number and size of caches, algorithm to run etc.), runs a simulation, and outputs the results to a file.

client.py

Implements the client-side algorithm (CS_{FNA}), described in the paper [2].

In addition, the client may be run in a degenerated mode, for simulating other, benchmark, access strategies.

DataStore.py

The class for a DataStore (cache). The cache stores items using the LRU policy. It also implements the cache-side algorithm for estimating FPR (false-positive ratio) and FNR (false-negative ratio), as described in the paper [2]. The cache itself is implemented in the file mod_pylru.py.

mod_pylru.py

Implementation of an LRU cache. Source code is taken from: Copyright (C) Jay Hutchinson https://github.com/jlhutch/pylru

SimpleBloomFilter.py, CountingBloomFilter.py,

A Simple and a Counting Bloom filter. To study more about Bloom filters, consider the following links: 1, 2, 3, 4.

Wiki_parser.py

Parses a WikiBench trace, Output: a csv file, where: - the first col. is the keys, - the 2nd col. is the id of the clients of this req, - the rest of the cols. are the locations ("k_loc") to which a central controller would enter this req. upon a miss.

Keys_list_parser.py

Parses a trace whose format is merely a list of keys (each key in a different line). Output: a csv file, where: - the first col. is the keys, - the 2nd col. is the id of the clients of this req, - the rest of the cols. are the locations ("k_loc") to which a central controller would enter this req. upon a miss.

gen_graph.py

generates the OVH network which exemplifies a commercial CDN (Content Delivery Network), and saves it on a .csv file.

gen_cost_hist.py

Generates a histogram showing the cache access costs for the OVH network

MyConfig.py

This file contains several accessory functions, used throughout the project, e.g. for generating the string describing the settings of the simulation, and generate the list of requests from the trace.

node.py

An accessory function for the PGM access strategy algorithm, described in the paper [1]. The function merges 2 input nodes. Inputs: 2 nodes to merge, H and L, and r = log(beta) Ouput: res_node - the result node, res_node.

candidate.py

A candidate sol' for the DSS (Data-Store-Selection) prob' (aka the "Cache-Selection" problem), consists of a list of DSs, theirs aggregate (mult' of) miss rate, and aggregate (sum of) accs cost

printf.py

An accessory function for format-printing to a file.

check_fpr_fnr_formulas.py

A script to compare the fpr, fnr, calculated by either the paper [2], or by an an older paper, which uses different model: [3] Y. Zhu and H. Jiang, False rate analysis of bloom filter replicas in distributed systems, ICPP, 2006, pp. 255-262.

access_strategies_with_staleness's People

Stargazers

 avatar  avatar

Watchers

 avatar

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.