So, as a result I'm investigating how I could implement multi-master replication. Fortunately mySQL has documented some of the source code and hosts this documentation online.
There are already references and hooks for multi-master replication in slave.cc
TODO: replace the line below with
once multi-master code is ready.
Of all the ideas that I have batted around, I've come to a common conclusion, modify mysql source to enable multi-master replication or make an external daemon that would essentially do the same thing.
- It would need to read multiple replication events
- It would need to log these multiple replication events
- It would need a command interface to dynamically add,remove,change hosts
In both cases here are my requirements.
I could either build a method for pushing replication events to a list of hosts, or build a subscribe method which I'm leaning towards.