MySQL Replication support for codegen...

thread: 12 messages  |  last: about 2 years ago  |  started: tuesday, february 20, 2007, 3:14 am pst


#1  |  ByronH (Tzaneen, Limpopo) South Africa
Tuesday, February 20, 2007, 3:14 AM PST

Hi there :)
This request could also be applicable to other supported databases that support master/slave replication.

Basically, codegen would be modified to allow definition of master and slave db connections. Codegen is performed on the master db only and then slave connection used for the Load() methods (check for records on slave first, then master if not found). Save() and Delete() methods would then only use the master db connection for queries.

Any comments on this?

Cheers :)
V57

PS: slave definition(s) could also be a weighted array within the master db connection containing locations and credentials:

<?php
// snippet...

define('DB_CONNECTION_1'serialize(array(
              
'adapter' => 'MySqli5',
              
'server' => 'masterserver',
              
'port' => null,
          
'database' => 'database',
              
'username' => 'user',
              
'password' => '******',
              
'profiling' => false,
              
'slaves' => array())));

// end...
?>
.bc
#2  |  Mike Ho (Sunnyvale, CA) United States of America Qcodo Administrator
Tuesday, February 20, 2007, 11:28 PM PST

Visor... is this something that you'd like to work on? :)

#3  |  ByronH (Tzaneen, Limpopo) South Africa
Tuesday, February 20, 2007, 11:41 PM PST

Ok, I'll give it a shot :)

#4  |  zekeonfire United States of America
Thursday, August 2, 2007, 3:27 PM PDT

Visor57, have you made any progress on this? I just started to go through the Qcodo code today to implement this feature for my company.

I'm really just in the beginning phases of implementing something like this, so any input you have to offer would be appreciated before I go off tilting at windmills. :)


Thanks.

#5  |  Raphael Cangucu (Belo Horizonte, Minas Gerais) Brazil
Wednesday, October 8, 2008, 8:23 AM PDT

Hi Visor57,

Do you need any help to implement this?

I think this could be a great tool for QCodo Framework and developers that want to scale their applications.

Regards.

#6  |  ByronH (Tzaneen, Limpopo) South Africa
Wednesday, October 8, 2008, 9:47 AM PDT

Hi Raphael,

I'm afraid I haven't been able to spend time on this due to the demands of the MIS project I'm busy with at work. I'm glad to see that the Qcodo community is alive and well and I hope that you will indeed offer your assistance in this regard as Qcodo really is a gem and enterprise features could definitely boost its appeal :)

Regards.

#7  |  Geert Heremans (Antwerp,Belgium) Belgium
Wednesday, October 8, 2008, 9:59 AM PDT

I'd pay for this ;-)

I offer one crate of Duvel to whomever fixes this.

PS: Due to the risks involved I will not send the crate. Only personal pickups in Belgium ;-)

#8  |  zekeonfire United States of America
Wednesday, October 8, 2008, 10:47 AM PDT

So, I started an implementation, but eventually changed direction and started looking into MySQL proxy (http://forge.mysql.com/wiki/MySQL_Proxy) and SQL Relay (sqlrelay.sourceforge.net) to route requests based on pattern matching the queries. I got it working ok, but then refactored our application to be less db intensive. One of those may be a good solution for you guys. They are more mature now than when I tried them.

Now we're working on a migration from PHP and QCodo to Ruby on Rails. I know, it might sound like blasphemy here, but that was the best move we could have made. QCodo has some cool things in it, but just not enough to keep us on PHP.

#9  |  kingwithin (San Francisco, CA) United States of America
Saturday, April 11, 2009, 4:04 PM PDT

Hi, how was your migration and were there any tools and suggestions you may have for doing the migration?

We're encountering challenges and I want to make a decision whether to keep painfully working with QCodo or make the move.

Thanks.

#10  |  kingwithin (San Francisco, CA) United States of America
Saturday, May 2, 2009, 10:54 PM PDT

Hi, I am very interested in how your migration went.  We're having challenges but also hoping someone in the qcodo community can get the framework up the speed....thanks!



Copyright © 2005 - 2012, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.