Digest::Guava - Perl XS interface to the Google's Guava consistent hashing algorithm
use Digest::Gauva qw(guava_hash); guava_hash($integer_key, $buckets_count);
OR
use Digest::Gauva; Digest::Gauva::guava_hash($integer_key, $buckets_count);
Google's Guava hashing algorithm.
Assign to input a "bucket" in the range [0, buckets), in a uniform manner that minimizes the need for remapping as buckets grows. That is, consistentHash(h, n) equals:
n - 1, with approximate probability 1/n;
consistentHash(h, n - 1), otherwise (probability 1 - 1/n).
See the wikipedia article on consistent hashing: http://en.wikipedia.org/wiki/Consistent_hashing for more information.
Google's implementation of Guava hash at https://github.com/google/guava.
For alternative consistent hash algorithms/implementations, search CPAN, but here's some:
Hash::Consistent
Digest::MurmurHash
Algorithm::ConsistentHash::CHash
Algorithm::ConsistentHash::Ketama
Mons Anderson, <mons@cpan.org>
<mons@cpan.org>
igorcoding, <igorcoding@gmail.com>
<igorcoding@gmail.com>
Please report any bugs or feature requests in https://github.com/igorcoding/Digest-Guava/issues
Copyright (C) 2016 by igorcoding
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.20.2 or, at your option, any later version of Perl 5 you may have available.
2 POD Errors
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
You forgot a '=back' before '=head1'
To install Digest::Guava, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Digest::Guava
CPAN shell
perl -MCPAN -e shell install Digest::Guava
For more information on module installation, please visit the detailed CPAN module installation guide.