[Dbix-class] RFC: DBIx::Class::Storage::DBI::mysql_repl - replicated MySQL data source

Matt S Trout dbix-class at trout.me.uk
Tue Sep 5 11:55:26 CEST 2006


norbert.csongradi at services.hu wrote:
> Hi folks,
> 
> I created a new storage class which supports MySQL replicated data source: one 
> master database where all the writing-related queries executed and it is 
> replicated to one or more slave databases where all the selects are executed.
> 
> Please check it, try it and I'm eager to see any type of comments...

This should (a) not be specific to one database (b) use DBD::Multiplex so it 
doesn't re-invent wheels.

Please don't use AUTOLOAD, it'll slow things down; generate out the methods 
instead.

Finally, you need to lock to the write source during a transaction for 
consistent read.

-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Dbix-class mailing list