Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: DBI multicasting?

by ask (Pilgrim)
on Nov 19, 2001 at 07:33 UTC ( [id://126204]=note: print w/replies, xml ) Need Help??


in reply to DBI multicasting?

If it's just for redundancy (and load balancing), you could make a wrapper for the DBI module that upon a database failure will try to replay to transaction on the other server. If it's only for reading it shouldn't be too hard.

 - ask

-- 
ask bjoern hansen, http://ask.netcetera.dk/   !try; do();

Replies are listed 'Best First'.
Re: Re: DBI multicasting?
by rob_au (Abbot) on Nov 19, 2001 at 07:57 UTC
    Agreed, this should be fine for the extraction of data - But if the client is looking submitting or changing data to the databases, then the best method would be for the wrapper to have two (or more) concurrent DBI handles with DBI->autocommit disabled. The DBI->commit method could be called after execute statements to all database handles had been issued. While this method isn't as good as internal synchronisation at the database level, it should suffice for most circumstances.

     

    Ooohhh, Rob no beer function well without!

      So what do you do if the commit fails on the second database handle?

      In any case it's hard to give advice on something like this without knowing more details about what kind of application the system needs to support.

       - ask

      -- 
      ask bjoern hansen, http://ask.netcetera.dk/   !try; do();
      

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://126204]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-19 03:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found