use ShardedKV; use ShardedKV::Continuum::Jump; my $skv = ShardedKV->new( continuum => ShardedKV::Continuum::Jump->new( from => { ids => [qw(node1 node2 node3 node4)], } ), storages => {...}, ); ... $skv->extend({ids => [qw(node5 node6 node7)]});
A continuum implementation based on Google's Jump consistent hashing algorithm.
It uses SipHash to turn the string keys into 64-bit integers.
Note that the *order* of shard IDs is significant, unlike with other continuum implementations. This is a limitation of the Jump algorithm.
* ShardedKV * ShardedKV::Continuum * ShardedKV::Continuum::CHash
Damian Gryski, <damian@gryski.com>
Copyright (C) 2014 by Damian Gryski
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.18.2 or, at your option, any later version of Perl 5 you may have available.
To install ShardedKV::Continuum::Jump, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ShardedKV::Continuum::Jump
CPAN shell
perl -MCPAN -e shell install ShardedKV::Continuum::Jump
For more information on module installation, please visit the detailed CPAN module installation guide.