[Catalyst] Per request DBIX Class Schema Connections
Scott McWhirter
scott+catalyst at konobi.co.uk
Sun Oct 4 13:23:08 GMT 2009
Another option is to handle this at the db layer using something like
sqlrelay. I haven't used it personally but have heard some good thing about
it from others. You can set it up to filter queries between different sets
of database hosts:
http://sqlrelay.sourceforge.net/sqlrelay/router.html
-- =
-Scott McWhirter- | -Technology Consultant-
[ Cloudtone Studios - http://www.cloudtone.ca ]
On Sun, Oct 4, 2009 at 04:19, Chris Grafham <cgrafham at yahoo.co.uk> wrote:
>
>
> Im looking for some advice for best practice for the following situation -
>
>
> 1. HTTP Request arrives.
> 2. Determine if a database connection is required for either a MySQL
> read-only slave or write master (via a piece of custom code based on requ=
est
> URL).
> 3. Connect to chosen database ($schema->connect).
> 4. Disconnect at end of request (no persistent db connections).
>
> Thanks in advance.
>
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20091004/02562=
b00/attachment.htm
More information about the Catalyst
mailing list