NAME

Data::RuledCluster - clustering data resolver

VERSION

This document describes Data::RuledCluster version 0.07.

SYNOPSIS

use Data::RuledCluster;

my $config = +{
    clusters => +{
        USER_W => [qw/USER001_W USER002_W/],
        USER_R => [qw/USER001_R USER002_R/],
    },
    node => +{
        USER001_W => ['dbi:mysql:user001', 'root', '',],
        USER002_W => ['dbi:mysql:user002', 'root', '',],
        USER001_R => ['dbi:mysql:user001', 'root', '',],
        USER002_R => ['dbi:mysql:user002', 'root', '',],
    },
};
my $dr = Data::RuledCluster->new(
    config => $config,
);
my $resolved_data = $dr->resolve('USER_W', $user_id);
# or
my $resolved_data = $dr->resolve('USER001_W');
# $resolved_data: +{ node => 'USER001_W', node_info => ['dbi:mysql:user001', 'root', '',]}

DESCRIPTION

# TODO

METHOD

DEPENDENCIES

Class::Load

Data::Util

BUGS

All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT.

SEE ALSO

perl

AUTHOR

Atsushi Kobayashi nekokak@gmail.com

LICENSE AND COPYRIGHT

Copyright (c) 2012, Atsushi Kobayashi. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.