* A DBI handle is a reference to a tied hash and so has an 'outer' hash that the handle reference points to and an 'inner' hash holding the DBI data. By allowing the inner handle to be changed, for example swapped with a different handle, many new behaviors become possible. For example a database handle to a database that's crashed could have it's inner handle changed to a new connection to a replica.

I love this functionality and couldn't believe it wasn't used more when I saw it in the code.
Your design of double-dereference is perfect for the high-availability/load-balancing needs.



* The DBD::Multiplex driver is intended to enable a wide range of
dynamic functionality including support for various high-availability
and load-balancing scenarios.  The old version has been used
successfully but was limited. It's being rewritten to greatly
increase its flexibility and has great potential, but development
has stalled.


I did a lot of work on the high-availability side of things with my DBIx::HA module, which is very crude (pure-perl and subclasses DBI instead of doing it at the driver level), but it works well in very high load production environments. I haven't yet published my latest version to CPAN because it can't work until DBI has the set_internal_handle() function. I could do it by adding the C code for it in DBIx::HA but it's ugly.
In any case, I'd be interested in helping out on the DBD::Multiplex driver. Is there some source I can look at?


H



Reply via email to