← Back to team overview

maria-developers team mailing list archive

API Documentaion for Replication Features

 

Hi,

I have a need for replicating data from multiple masters (independent data going to different tables).

I have looked into the following with no success:

Tungsten:
Slow, CPU hungry, outrageously bloated, and unacceptably unreliable (replication will stall silently at times, and the only way to resume it is to offline and online the replication service).

mysql-replication-listener:
Just about got it to work with local binlogs, but haven't managed to get it to connect via TCP to a MySQL server.

So what I was hoping to do is write something based on the existing MySQL code since at least that should "just work". The problem is - I am completely unfamiliar with MySQL internals, and I haven't found any function level API documentation. So, would anyone here be kind enough to point me at the specific bits of code in MySQL that handle:

1) Slave TCP connections to the master and binlog fetching
2) Binlog parsing
3) Config file parsing

In the longer term I'd like to write a patch that adds multiple-master functionality into MySQL itself. For configuring it, I was thinking about the following WRT configuration in my.cnf with multiple section instances, e.g.:

[replicator]
server-id=12345
master-host=server1
master-port=3306
master-user=user1
master-password=password1
replicate-do-table=db1.table1

[replicator]
server-id=12345
master-host=server2
master-port=3306
master-user=user2
master-password=password2
replicate-do-table=db2.table2

etc.


Any pointers would be greatly appreciated. If somebody here is already undertaking a similar effort, I would rather like to lend a hand.

TIA.

Gordan


Follow ups