[Dbix-class] Replication Branch, Status and Call for Comments

John Napiorkowski jjn1056 at yahoo.com
Sat Jun 7 16:10:16 BST 2008


Hi,

So this is a call for comments on the outstanding replication_redux branch, which is scheduled to be merged back to trunk shortly.  This email is a summary of the features, differences from the existing version, and any issues or questions I am punting to the group.

Features:

- Enables support of splitting read/write queries between a master and a pool of replicated databases.

- Allows pluggable balancer algorithms (currently supports Random and Get First

- Adds support for queries information from the underlying databases so that you can set maximum lag-behind-master on the slaves.

- automatically drops slaves that disconnect or lag behind a preset max.  Automatically adds the slave back when it 'catches up'.

- has a straightforward method to force all queries temporarily to the master, should you need realtime responsiveness to inserts.


Notes:

In order to support a few realtime features some changes to non storage DBIC code had to be made.  For example, the guts of DBIC::PK->discard_changes were moved to DBIC::Storage so that replication could make sure reloading of results are properly directed to the master.  Additionally, I added some methods to DBIC::Storage to support querying slave status, so that we could support things like dropping slaves that fall too far behind, etc.  Putting those methods at this level of abstraction may not be the best choice, but I can't figure any less ugly way to solve it.

Diff between the branch and truck attached.  Comment now or live with my code changes :)

Sincerely,
John




      
-------------- next part --------------
A non-text attachment was scrubbed...
Name: replication.diff.gz
Type: application/x-gzip
Size: 16241 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20080607/5ff7db3f/replication.diff.bin


More information about the DBIx-Class mailing list