Tripp Lilley [mailto:[EMAIL PROTECTED] wrote:
> On Mon, 24 Feb 2003, Geoffrey Talvola wrote:
> 
> > Another approach is to avoid threads and use a database 
> > adapter specifically
> > designed for integration with Twisted's event loop (I don't 
> > know if such
> > things exist, but it seems that Twisted has a little of 
> > everything...).  But
> > in that case you're back to "contorting" your code to fit 
> > the async model.
> > Looking at some of the servlets I'm using, with significant 
> > amounts of code
> > and potentially many SQL queries involved, I shudder to think at the
> > convolutions I'd have to put into place to make them fit a 
> > purely async
> > model.  It just doesn't fit my brain and would make the 
> > code significantly
> > more complicated and less understandable and maintainable.
> 
> All this talk led me to take another look at Twisted :) I won't like
> it[1], but then, that's because I don't like anything :) (ask Chuck).
> 
> However, while I was reading the docs, I came across "Twisted 
> Enterprise",
> which is an asynchronous wrapper around the DB API, with its own
> connection pooling and what-not:
> 
>       http://twistedmatrix.com/documents/howto/enterprise
> 
> This might answer your SQL question?

Yes, it does.  Using this, you could write efficient async code that uses
SQL without explicitly using threads yourself.  But what I find amusing is
that Twisted Enterprise's implementation actually uses threads itself,
internally.

- Geoff


-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to