Giter VIP home page Giter VIP logo

hashkv's Introduction

HashKV

Enabling Efficient Updates in Key-value Storage via Hashing

Overview

The prototype is written in C++ and uses 3rd parity libraries, including

Minimal Requirements

Minimal requirement to test the prototype:

  • Ubuntu 14.04 LTS (Server)
  • 1GB RAM

Installation

  1. On Ubuntu 14.04 LTS (Server), install
    • C++ compiler: g++ (version 4.8.4 or above)
    • Boost library: libboost-system-dev, libboost-filesystem-dev, libboost-thread-dev
    • Snappy: libsnappy-dev
    • CMake (required to compile HdrHistogram_c): cmake
    • Zlib (required to compile HdrHistogram_c): zlib1g-dev
$ sudo apt-get update
$ sudo apt-get install g++ libboost-system-dev libboost-filesystem-dev libboost-thread-dev libsnappy-dev cmake zlib1g-dev
  1. Download and extract the source code tarball (./hashkv-*.tar.gz)
$ tar zxf hashkv-*.tar.gz
  1. Setup the environment variable for HashKV as the root directory of folder hashkv
$ cd hashkv
$ export HASHKV_HOME=$(pwd)
  1. Compile HdrHistogram_c (libhdr_histogram.so) under lib/HdrHistogram_c-0.9.4,
$ cd ${HASHKV_HOME}/lib/HdrHistogram_c-0.9.4
$ cmake .
$ make
  1. Compile LevelDB (libleveldb.so) under lib/leveldb,
$ cd ${HASHKV_HOME}/lib/leveldb
$ make

Testing the Prototype

  1. Compile the prototype and the test program.
$ cd ${HASHKV_HOME}
$ make

The test program is generated under bin/ after compilation, named hashkv_test.

  1. Before running, add path to shared libraries under lib/leveldb/out-shared and lib/HdrHistogram_c-0.9.4/src:
$ export LD_LIBRARY_PATH="$HASHKV_HOME/lib/leveldb/out-shared:$HASHKV_HOME/lib/HdrHistogram_c-0.9.4/src:$LD_LIBRARY_PATH"
  1. Then, switch to folder bin/
$ cd ${HASHKV_HOME}/bin
  1. Create the folder for key storage (LSM-tree), which is named leveldb by default
$ mkdir leveldb
  1. Create the folder for value storage
$ mkdir data_dir
  1. Clean the LSM-tree and the value storage folders before run
$ rm -f data_dir/* leveldb/*
  1. Choose and copy one of the example configuration files [db_sample_config.ini] corresponding to different designs
  • HashKV: hashkv_sample_config.ini
  • vLog: vlog_sample_config.ini
  • LevelDB: leveldb_sample_config.ini
$ cp [db_sample_config.ini] config.ini
  1. Run the test program of the prototype under the chosen design
$ ./hashkv_test data_dir 100000

You can repeat steps 6-8 to try other designs.

Note that since the data layout differs between designs, the LSM-tree and the value store folders must be cleared when one switches to another design.

Publications

See our papers for greater design details of HashKV:

hashkv's People

Contributors

ravenxrz avatar

Stargazers

 avatar sunzhoujia avatar Eason Wang avatar Daveshammer avatar smile-luobin avatar Xiaoliang avatar yi wang avatar  avatar

Watchers

James Cloos 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.