Code Monkey home page Code Monkey logo

pbs's Introduction

Parity Bitmap Sketch

Usage

#include "PBS.hpp"
std::vector<uint> host = {1,2,3}, remote = {2,3,4};
pbs = PBS(host, remote);
pbs.reconcile(sub_num, logn, t, seed, split_num);

See demo for details.

Demo

You will need 'keypool.txt' and 'seedpool.txt' to run this demo. Both files should contain enough distinct uint32 items, one in each line. Keys are the items to reconcile. Seeds are for randomization.

Build

  1. mkdir build && cd build
  2. cmake .. && make

Run

  • ./demo $n_test $n_host $n_remote $n_intersect $delta $logn $t $split_num
  • Parameters:
    • $n_test: number of tests
    • $n_host: number of host's items
    • $n_remote: number of remote's items
    • $n_intersect: number of items both in host and remote
    • $delta: 1/detla = average disticnt items in each group
    • $logn, $t: BCH code parameters, use BCH(n,t) code
    • $split_num: number of partitions when BCH code failed
  • Example: ./demo 10 100000 100000 99900 0.2 10 13 3

Reference

  1. Gong, Long, et al. "Space-and Computationally-Efficient Set Reconciliation via Parity Bitmap Sketch (PBS)."
  2. minisketch: https://github.com/sipa/minisketch
  3. xxhash: https://github.com/Cyan4973/xxHash

pbs's People

Watchers

 avatar Ziheng Liu avatar

Forkers

why1221

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.