469,281 Members | 2,486 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,281 developers. It's quick & easy.

Twisted/Woven threading?

I've experimented with a simple web application made with woven and
stated by twistd from a .tap file, on a Win32. It seems that the web
server started that way is not multitasked/multithreaded and that one
request that requires long processing (e.g. a factory that produces a
long result fetched from a database) makes the server totaly unresponsive.

Is that normal? What can I do to make it multithreaded?

Jul 18 '05 #1
3 1333
On 2004-02-29 20:07:04 -0500, Ivan Voras <ivoras@__geri.cc.fer.hr> said:
I've experimented with a simple web application made with woven and
stated by twistd from a .tap file, on a Win32. It seems that the web
server started that way is not multitasked/multithreaded and that one
request that requires long processing (e.g. a factory that produces a
long result fetched from a database) makes the server totaly
unresponsive.

Is that normal? What can I do to make it multithreaded?


You're probably using DBAPI stuff directly, you can't do that, it's
blocking. You need to do that work in a separate thread, the easiest
way is probably with twisted.enterprise. There are tutorials and such
about this, and a better place to ask is the Twisted mailing list(s).

-bob

Jul 18 '05 #2
Bob Ippolito wrote:
On 2004-02-29 20:07:04 -0500, Ivan Voras <ivoras@__geri.cc.fer.hr> said:
I've experimented with a simple web application made with woven and
stated by twistd from a .tap file, on a Win32. It seems that the web
server started that way is not multitasked/multithreaded and that one
request that requires long processing (e.g. a factory that produces a
long result fetched from a database) makes the server totaly
unresponsive.

Is that normal? What can I do to make it multithreaded?

You're probably using DBAPI stuff directly, you can't do that, it's
blocking. You need to do that work in a separate thread, the easiest
way is probably with twisted.enterprise. There are tutorials and such
about this, and a better place to ask is the Twisted mailing list(s).


Actually, I don't think the problem is in the db itself, but in the
formatting (the "factory" that transformed database result into xhtml).
The query itself is fast and trivial.
Jul 18 '05 #3
On Mon, 01 Mar 2004 02:07:04 +0100, Ivan Voras <ivoras@__geri.cc.fer.hr>
wrote:
I've experimented with a simple web application made with woven and
stated by twistd from a .tap file, on a Win32. It seems that the web
server started that way is not multitasked/multithreaded and that one
request that requires long processing (e.g. a factory that produces a
long result fetched from a database) makes the server totaly unresponsive.

Is that normal? What can I do to make it multithreaded?


Twisted is by default singlethreaded. If you want multithreading, you
need to arrange that yourself and write the code for your web server.

BTW, Woven is depreciated for new developements and will be replaced by
Newov (new woven).

-pu
--
http://www.homepages.lu/pu/
Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by mir nazim | last post: by
16 posts views Thread by Rob Snyder | last post: by
2 posts views Thread by willie | last post: by
2 posts views Thread by GregM | last post: by
reply views Thread by sndive | last post: by
1 post views Thread by sndive | last post: by
3 posts views Thread by =?GB2312?B?0rvK18qr?= | last post: by
1 post views Thread by Bruce Frederiksen | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.