Set::ClusterDistribute items across nodes in a load balanced way and show takeovers in failure scenarios. | |
Download |
Set::Cluster Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Ton Voon
- Publisher web site:
- http://search.cpan.org/~tonvoon/
Set::Cluster Tags
Set::Cluster Description
Distribute items across nodes in a load balanced way and show takeovers in failure scenarios. Set::Cluster is a Perl module to distribute items across nodes in a load balanced way and show takeovers in failure scenarios.SYNOPSIS # Hash of items, with relative weighting $h = { 'Oranges' => 17, 'Apples' => 3, 'Lemons' => 10, 'Pears' => 12 }; $c = Set::Cluster->new; $c->setup( nodes => , items => $h ); $c->calculate(2); # Go 2 levels deep # Functions to parse $c->results @takeover = $c->takeover( node => "A", fail => "C" ); # Items taken over due to a failure of C @items = $c->items( node => "A", fail => "B" ); # All items for A, when B has failed $node = $c->hash_by_item( fail => "" ); # Returns a hash where $node->{$item} returns the node name $results = $c->results; # Returns a hash with how items are split across the nodes # This structure may change in futureThis is an attempt at abstracting clustering. The idea is that you can define a list of items with relative weightings, and a list of nodes that the items should be spread across.The plugin then calculates where items will be distributed to balance the weightings. If you calculate more than 1 level, it will show what happens if there is a failure. When a node fails, its items are distributed amongst the remaining nodes. Requirements: · Perl
Set::Cluster Related Software