X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FReplicated.pm;h=3bfbf603ff5e8cb632acc27c609f6e27f91e3d09;hb=9c0df5f32b68e23c670c89ce6cdbff60b4bd0ed0;hp=27136b17be907a1ea280ed696cec566f1b527186;hpb=f068a139c662bde5a7d03de9eff98aa3c3e8ade2;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/Replicated.pm b/lib/DBIx/Class/Storage/DBI/Replicated.pm index 27136b1..3bfbf60 100644 --- a/lib/DBIx/Class/Storage/DBI/Replicated.pm +++ b/lib/DBIx/Class/Storage/DBI/Replicated.pm @@ -43,15 +43,21 @@ one master and numerous slave database connections. All write-type queries database, all read-type queries (SELECTs) go to the slave database. Basically, any method request that L would normally -handle gets delegated to one of the two attributes: L or to -L. Additionally, some methods need to be distributed +handle gets delegated to one of the two attributes: L or to +L. Additionally, some methods need to be distributed to all existing storages. This way our storage class is a drop in replacement for L. Read traffic is spread across the replicants (slaves) occuring to a user selected algorithm. The default algorithm is random weighted. -TODO more details about the algorithm. +=head1 NOTES + +The consistancy betweeen master and replicants is database specific. The Pool +gives you a method to validate it's replicants, removing and replacing them +when they fail/pass predefined criteria. It is recommened that your application +define two schemas, one using the replicated storage and another that just +connects to the master. =head1 ATTRIBUTES