Welcome Guest, Not a member yet? Register   Sign In
duplicate reads and writes in 2 databases automatically
#1

[eluser]daved[/eluser]
Hi,
I am having a problem duplicating reads and writes in 2 databases automatically without specifying which groups to read/write all the time. e.g
$this->db->get('table');
$this->otherdb->get('table');

Is there a way I can also use to prevent reading/writing from one of the tables if one of them fails/is absent?

Thanks
#2

[eluser]elite[/eluser]
If I understand what you're trying to do, I'd look at using mysql replication rather than doing this in code
#3

[eluser]daved[/eluser]
Thanks, looked at that but it;s not an option.

Do you have any other suggestions.

Thanks
#4

[eluser]danmontgomery[/eluser]
[quote author="daved" date="1308766601"]Thanks, looked at that but it;s not an option[/quote]

Any particular reason? You're looking to reinvent the wheel, and I guarantee it's not going to function as well as the built in replication functionality.
#5

[eluser]daved[/eluser]
Database servers will the in two different regions. There should also be no cross communication between the servers. If you have a better way of doing this, I'll very much appreciate it
#6

[eluser]elite[/eluser]
[quote author="daved" date="1308767998"]Database servers will the in two different regions. There should also be no cross communication between the servers. If you have a better way of doing this, I'll very much appreciate it[/quote]

Why is communication not possible between DB servers?

As I see it you will run in to all kinds of problems, performance would be an obvious concern. But more importantly how do you plan to replicate any updates that are made to one database while the other is offline?




Theme © iAndrew 2016 - Forum software by © MyBB