Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    ShardedKV 0.13

    Download button

    No screenshots available
    Downloads: 113  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Steffen Muller | More programs
    Perl Artistic License / FREE
    July 7th, 2012, 13:25 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    ShardedKV description

    An interface to sharded key-value stores

    ShardedKV is a Perl module that implements an abstract interface to a sharded key-value store. The storage backends as well as the "continuum" are pluggable. "Continuum" is to mean "the logic that decides in which shard a particular key lives". Typically, people use consistent hashing for this purpose and very commonly the choice is to use ketama specifically. See below for references.

    Beside the abstract querying interface, this module also implements logic to add one or more servers to the continuum and use passive key migration to extend capacity without downtime. Do make it a point to understand the logic before using it. More on that below.

    SYNOPSIS

     use ShardedKV;
     use ShardedKV::Continuum::Ketama;
     use ShardedKV::Storage::Redis;
     
     my $continuum_spec = [
     ["shard1", 100], # shard name, weight
     ["shard2", 150],
     ];
     my $continuum = ShardedKV::Continuum::Ketama->new(from => $continuum_spec);
     
     # Redis storage chosen here, but can also be "Memory" or "MySQL".
     # "Memory" is for testing. Mixing storages likely has weird side effects.
     my %storages = (
     shard1 => ShardedKV::Storage::Redis->new(
     redis_master_str => 'redisserver:6379',
     redis_slave_strs => ['redisbackup:6379', 'redisbackup2:6379'],
     ),
     shard2 => ShardedKV::Storage::Redis->new(
     redis_master_str => 'redisserver:6380',
     redis_slave_strs => ['redisbackup:6380', 'redisbackup2:6380'],
     ),
     );
     
     my $skv = ShardedKV->new(
     storages => \%storages,
     continuum => $continuum,
     );
     
     my $value = $skv->get($key);
     $skv->set($key, $value);
     $skv->delete($key);


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    key-value store | Perl module | sharded | key-value | store

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM