Used to wrap MySQLdb for something like except that I did it for sharding. It worked well on distributing load across multiple database servers. I think the guys from my former company updated the wrapper to use adbapi.<div>
<br></div><div>- Alvin<br><br><div class="gmail_quote">On Wed, Sep 1, 2010 at 10:54 AM, Jason J. W. Williams <span dir="ltr">&lt;<a href="mailto:jasonjwwilliams@gmail.com">jasonjwwilliams@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">That&#39;s one way of handling it. Another way is to wrap the library so<br>
it does the splitting automatically. The advantage to the latter is<br>
not making mistakes where you accidentally use the READ connection for<br>
a write. For non-async Python there are some tools like SQL Relay<br>
which will do this for you, but you have to setup SQL Relay servers<br>
and use the SQL Relay dbapi driver. MySQL Proxy will also do it, but<br>
it&#39;s not very stable.<br>
<br>
I was somewhat hoping someone had already written a wrapper for doing<br>
the splitting. Which brings me to a related question...if I were to<br>
write a wrapper to do the splitting, would wrapping MySQLdb be<br>
sufficient? Or would wrapping adbapi be the better path?<br>
<font color="#888888"><br>
-J<br>
</font><div><div></div><div class="h5"><br>
On Tue, Aug 31, 2010 at 8:40 PM, Itamar Turner-Trauring<br>
&lt;<a href="mailto:itamar@itamarst.org">itamar@itamarst.org</a>&gt; wrote:<br>
&gt; On Tue, 2010-08-31 at 20:36 -0600, Jason J. W. Williams wrote:<br>
&gt;&gt; Sending writes (e.g. INSERTs and UPDATEs) to a master MySQL server and<br>
&gt;&gt; reads (SELECTs) to a slave.<br>
&gt;<br>
&gt; So... two adbapi.ConnectionPool instances, one for the server, one for<br>
&gt; the slave?<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Twisted-Python mailing list<br>
&gt; <a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
&gt; <a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
&gt;<br>
<br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><a href="http://www.alvinatorsplayground.blogspot.com/">http://www.alvinatorsplayground.blogspot.com/</a><br>
</div>