Mysql Distributed Databases

Sasha Pachev sasha at surveyz.com
Sat Feb 5 16:04:02 MST 2005


Kimball:

MySQL cannot do that yet, and as far as I know this functionality is not yet in 
development.

However, you can add a little hack on top of it solve the problem. Ideally, you 
would implant it straight into MySQL source code, but it is possible to do it 
just with client code. Here is a basic idea:

   * Each node runs with log-bin, which logs the updates
   * Hack the slave code to multi-master
   * You will need to add some extra tracking logic to make sure the same update 
does not get applied twice if it gets to the same server through two different 
routes. Binlog events have sequence numbers, so you could probably keep a some 
kind of a smart tree/hash/list combination/hybryd that will allow you to know if 
a certains sequence number from given server_id has been applied. Probably just 
a list of ranges will do.

With a client app, take mysqlbinlog as a base, and extend it.

-- 
Sasha Pachev
AskSasha Linux Consulting
http://www.asksasha.com




More information about the PLUG mailing list