[Twisted-Python] Announcing txMySQL - native async Twisted MySQL protocol

Luke Marsden luke-lists at hybrid-logic.co.uk
Tue Feb 8 17:53:38 EST 2011


Hi everyone,

I'm pleased to announce the release of txMySQL, a native Twisted MySQL
protocol implementation at https://github.com/hybridlogic/txMySQL

The bulk of this code is courtesy of _habnabit (thank you!), I just
added authentication support and fixed a couple of bugs which were
stopping the MySQL protocol parser working. As we will be using this in
production at Hybrid Logic I am happy to take over maintenance of it.

As you can tell from the TODO list in the README, this is still a fairly
rough draft, but it works well enough to .fetchall() basic results sets
and .query() any other MySQL statements you care to run. See example.py.

The incentive to produce this was due to a critical bug in MySQLdb with
threading under load (on FreeBSD) which was causing Python to lock up. I
decided that a native client protocol implementation would be less work
than tracking down that bug, and besides it's something I've wanted to
do for a while ;-)

It might be interesting to see how adbapi could be modified to use a
DeferredSemaphore to implement a completely threadless pool of MySQL
connections with this...?

Feel free to fork, tweak, fix, use, report issues, etc.

-- 
Best Regards,
Luke Marsden
CTO, Hybrid Logic Ltd.

Web: http://www.hybrid-cluster.com/
Hybrid Web Cluster - cloud web hosting

Phone: +441172232002 / +16179496062






More information about the Twisted-Python mailing list