Hey Lars,

Yeah, that is indeed possible.  In fact, I think I've seen requests for
something along the same lines (reads sent to slaves, writes sent to
masters.)  But this type of adapter definitely needs to be well thought out
and tested.

In the interim, the type of functionality you talk about can be achieved via
the mysql proxy http://forge.mysql.com/wiki/MySQL_Proxy and scripting (if
its a read, send it to machine x, if its a write send to machine y)... You
can also do query rewriting on the fly.  This pushes the database centric
stuff back into the database where some might argue it belongs.

Either way, mysql proxy is a pretty interesting piece of software.

-ralph



> must extend the abstract class). The connection adapter is a composite
> of all of your required database connections. Plus it decides which
> concrete adapter needs to be used for the concrete query. It could even
> implement more complex stuff like sending queries to different servers
> and merging the results and so on.

-- 
Ralph Schindler
Software Engineer     | [email protected]
Zend Framework        | http://framework.zend.com/


Reply via email to