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.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    POE::Component::MDBA 0.01003

    Download button

    No screenshots available
    Downloads: 318  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Fair (2.7/5)
    9 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Daisuke Maki | More programs
    Perl Artistic License / FREE
    May 16th, 2008, 01:56 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    POE::Component::MDBA description

    A multi-satabase aggregation with POE.

    POE::Component::MDBA is a multi-database aggregation with POE.

    SYNOPSIS

    use POE qw(Component::MDBA);

    POE::Component::MDBA->spawn(
    alias => $alias,
    backend => 'DBI', # optional
    backend_args => [ ... list of connection sources ... ]
    );

    # else where in your code...
    POE::Kernel->post($alias, 'execute', {
    args => [ ... list database arguments ... ]
    });


    WARNING: Alpha grade software! API still subject to change.

    MDBA Stands for Multi-Database Aggregation. This module is a helper module that allows you to send multiple (possibly all different) queries to multiple databases.

    One application that this might be useful is when you access a vertically-partitioned database cluster. A vertically-partitioned database cluster is a set of databases whose table definitions are same across each database instance, but the each database instance is responsible for a different set of data.

    This type of application typically requires that you send slightly differing SQL queries to each database instance, then aggregate the results into a single result. With normal DBI operation, it would look something like:

    my @connect_info;
    my @sql;
    my @args;
    my @results;
    for my $x (0..$n) {
    # connect to a database
    my $dbh = DBI->connect( @{ $connect_info[$x] } );

    # get the applicable sql and arguments for this database
    my $sql = $sql[$x];
    my $args = $args[$x];
    my $sth = $dbh->prepare( $sql );

    $sth->execute(@$args);
    while (my $row = $sth->fetchrow_hashref) {
    push @results, $row;
    }
    }
    return @results;


    But of course, this will make the client wait while it queries $n database instances - it would be nice if we just parallelized all of these, and be able to merge the results.

    POE::Component::MDBA acomplishes this by pre-spawning multiple databases, and sending asynchronous queries to those database instances. As soon as each query is done, an aggregator function is called so you can merge the results to your liking.

    However, the main complexity lies in the fact that usually each application likes to run these queries in their own way, hence making (1) query partitioning (2) sql handling, and (3) results merging completely different from application to application.

    POE::Component::MDBA attempts to solve this by separating each of these steps from the module logic and thus making each step configurable.

    But no worries if you just want to run a simple query. The POE::Component::MDBA::Backend modules that come with this module will handle most of the simple cases for you.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    POE component | multi-database aggregation | Perl module | POE | component | MDBA

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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