Re: [Twisted-Python] adbapi MySQL read/write splitting

2010-09-01 Thread Jason J. W. Williams
That is correct. In our case we've audited our code for transactions and all of ours are single statement trans. It's pretty typical for read/write splitting to forbid multiple-statement transactions as a cost of doing it. -J Sent via iPhone Is your e-mail Premiere? On Sep 1, 2010, at 7:1

Re: [Twisted-Python] adbapi MySQL read/write splitting

2010-09-01 Thread Itamar Turner-Trauring
On Tue, 2010-08-31 at 20:54 -0600, Jason J. W. Williams wrote: > That's one way of handling it. Another way is to wrap the library so > it does the splitting automatically. The advantage to the latter is > not making mistakes where you accidentally use the READ connection for > a write. That sound

Re: [Twisted-Python] adbapi MySQL read/write splitting

2010-08-31 Thread Jason J. W. Williams
Hey Alvin, Thank you for the info. Any idea what kind of changes they had to make to the MySQLdb wrapper for adbapi to like it? -J On Tue, Aug 31, 2010 at 9:13 PM, Alvin Delagon wrote: > Used to wrap MySQLdb for something like except that I did it for sharding. > It worked well on distributing

Re: [Twisted-Python] adbapi MySQL read/write splitting

2010-08-31 Thread Alvin Delagon
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. - Alvin On Wed, Sep 1, 2010 at 10:54 AM, Jason J. W. Williams < jasonjwwilli.

Re: [Twisted-Python] adbapi MySQL read/write splitting

2010-08-31 Thread Jason J. W. Williams
That's one way of handling it. Another way is to wrap the library so it does the splitting automatically. The advantage to the latter is not making mistakes where you accidentally use the READ connection for a write. For non-async Python there are some tools like SQL Relay which will do this for yo

Re: [Twisted-Python] adbapi MySQL read/write splitting

2010-08-31 Thread Itamar Turner-Trauring
On Tue, 2010-08-31 at 20:36 -0600, Jason J. W. Williams wrote: > Sending writes (e.g. INSERTs and UPDATEs) to a master MySQL server and > reads (SELECTs) to a slave. So... two adbapi.ConnectionPool instances, one for the server, one for the slave? ___

Re: [Twisted-Python] adbapi MySQL read/write splitting

2010-08-31 Thread Jason J. W. Williams
Sending writes (e.g. INSERTs and UPDATEs) to a master MySQL server and reads (SELECTs) to a slave. -J On Tue, Aug 31, 2010 at 8:32 PM, Itamar Turner-Trauring wrote: > On Tue, 2010-08-31 at 15:17 -0600, Jason J. W. Williams wrote: >> Is anyone doing read/write splitting with adbapi? Looking for a

Re: [Twisted-Python] adbapi MySQL read/write splitting

2010-08-31 Thread Itamar Turner-Trauring
On Tue, 2010-08-31 at 15:17 -0600, Jason J. W. Williams wrote: > Is anyone doing read/write splitting with adbapi? Looking for advice > if anyone has tackled this before. Thank you in advance. What is "read/write splitting"? ___ Twisted-Python mailing