Skip to content

anchorhash/go-anchorhash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AnchorHash: A Scalable Consistent Hash

This repository contains a Go implemenetation of AnchorHash based on the paper AnchorHash: A Scalable Consistent Hash.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • get all dependencies:
    go get github.com/golang-collections/collections/stack
    go get github.com/spaolacci/murmur3
    
  • if you went to use the benchmarks analysis benchstat you can download it useing:
    go get golang.org/x/perf/cmd/benchstat
    
    and make sure it is installed using command:
    benchstat
    

Installation

  • Clone the repository (inside your local GOPATH or GOROOT) and cd into it:
    git clone https://github.com/anchorhash #inside your local GOPATH or GOROOT
    cd anchorhash
    

Running the tests

you can run the tests by executing the following commands from the root directory.

rate benchmarks

  • running the rate benchmarks: (WIP this part should be according to new directories structure)
    • ratio benchmark
      go test ./benchmarks/rate -parallel 1 -benchtime=50x -cpu 1 -count 5 -bench=BenchmarkRatioRate >ratio_benchmark.out
      benchstat ratio_benchmark.out
      
    • load benchmark
      go test ./benchmarks/rate -parallel 1 -benchtime=50x -cpu 1 -count 5 -bench=BenchmarkLoadRate >load_benchmark.out
      benchstat load_benchmark.out
      
  • running the consistency test:
    go run tests/consistency/ManualConsistencyUnitTest.go tests/consistency/TestConsistency.go
    
  • running the balance test:
    go run tests/balance/ManualBalanceUnitTest.go tests/balance/TestBalance.go
    

code

Authors

add Authors

License

add License

Acknowledgments

About

go implementation of anchorhash

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published