Skip to content

Consistent hashing implementation for Ruby based on arXiv:1406.2294v1

License

Notifications You must be signed in to change notification settings

cdolan/jumphash

Repository files navigation

Jumphash

Build Status

MRI Ruby implementation of the jump consistent hash algorithm by John Lamping and Eric Veach of Google.

Installation

Add this line to your application's Gemfile:

gem "jumphash"

And then execute:

$ bundle

Or install it yourself as:

$ gem install jumphash

Usage

require "jumphash"
require "xxhash"

JumpHash.hash_key(314159265359, 256)
# => 80

JumpHash.hash_string("foobar", 256) { |str| XXhash.xxh64(str) }
# => 76

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/cdolan/jumphash. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

About

Consistent hashing implementation for Ruby based on arXiv:1406.2294v1

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published