On Tue, Mar 24, 2009 at 8:23 AM, Dave Cross <[email protected]> wrote: > > I'm looking for some advice on best practice for dealing with replicated > MySQL databases. > > My current client has a large database which is split across a RW master and > several RO slaves (I believe that's how MySQL replication always works). > They're just toying with replacing a lot of their DB code with DBIx::Class. > > I assume that other people have been working with similar architecture and > I'd be grateful for any advice you might have. In particular we're thinking > about problems like: > > * How to decide whether to connect to the master or the slave > * Do we maintain a pool of database handles to both masters and slaves. > * Whether it ever makes sense to upgrade a slave connection to a master > connection on the fly > * How referential integrity works in a world where a slave can be out of > date compared to the master (actually, we know the answer to that one - "it > doesn't") > > All suggestions, gratefully received. >
Dave, DBIx::Class::Storage::DBI::Replicated will handle this for you http://search.cpan.org/~ribasushi/DBIx-Class-0.08099_07/lib/DBIx/Class/Storage/DBI/Replicated.pm Thanks, John _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[email protected]
