streametry/jumphash

Jump Consistent Hashing algorithm in Java

Java

7

12 commits

updated Sep 20, 2014

See the code

README

JumpHash

Jump Consistent Hashing algorithm in Java

Abstract from the paper http://arxiv.org/abs/1406.2294:

We present jump consistent hash, a fast, minimal memory, consistent hash algorithm that can be expressed in about 5 lines of code. In comparison to the algorithm of Karger et al., jump consistent hash requires no storage, is faster, and does a better job of evenly dividing the key space among the buckets and of evenly dividing the workload when the number of buckets changes. Its main limitation is that the buckets must be numbered sequentially, which makes it more suitable for data storage applications than for distributed web caching.

Uses Guava library for unsigned longs.

Usage

int bucket = JumpHash.consistent(nrOfBuckets, myObject);

Download

Available on Maven central:

  • com.streametry:jumphash:1.0

Requires Java 1.8

Build

gradle jar

License

MIT

Contributors

streampi

8 commits

streametric

4 commits

streametry/jumphash

Jump Consistent Hashing algorithm in Java

Java

7

12 commits

updated Sep 20, 2014

See the code

README

JumpHash

Jump Consistent Hashing algorithm in Java

Abstract from the paper http://arxiv.org/abs/1406.2294:

We present jump consistent hash, a fast, minimal memory, consistent hash algorithm that can be expressed in about 5 lines of code. In comparison to the algorithm of Karger et al., jump consistent hash requires no storage, is faster, and does a better job of evenly dividing the key space among the buckets and of evenly dividing the workload when the number of buckets changes. Its main limitation is that the buckets must be numbered sequentially, which makes it more suitable for data storage applications than for distributed web caching.

Uses Guava library for unsigned longs.

Usage

int bucket = JumpHash.consistent(nrOfBuckets, myObject);

Download

Available on Maven central:

  • com.streametry:jumphash:1.0

Requires Java 1.8

Build

gradle jar

License

MIT

Contributors

streampi

8 commits

streametric

4 commits

Languages

Java

76.8%

Groovy

23.2%