[Twisted-Python] Twisted synchronous and asynchronous db connections

Doug Farrell doug.farrell at gmail.com
Tue Nov 10 07:41:56 EST 2009


Jean-Paul,

Thanks for the link, I'm looking at it right now.

Doug

On Mon, Nov 9, 2009 at 10:43 PM,  <exarkun at twistedmatrix.com> wrote:
> On 03:24 am, doug.farrell at gmail.com wrote:
>>Hi all,
>>
>>Our projects at work include synchronous applications (short lived)
>>and asynchronous Twisted applications (long lived). We're re-factoring
>>our database and are going to build an API module to decouple all of
>>the SQL in that module. I'd like to create that API so both
>>synchronous and asynchronous applications can use it. For the
>>synchronous applications I'd like calls to the database API to just
>>return data (blocking) just like using MySQLdb, but for the
>>asynchronous applications I'd like calls to the same API
>>functions/methods to be non-blocking, probably returning a deferred.
>>Anyone have any hints, suggestions or help they might offer me to do
>>this?
>
> Chris Armstrong wrote a synchronous implementation of Deferred.  That
> might be an approach to investigate:
>
>  http://radix.twistedmatrix.com/2007/12/supporting-both-asynchronous-
> and.html
>
> Jean-Paul
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>



More information about the Twisted-Python mailing list