[Zope] Getting Zope to fetch info via HTTP

Passin, Tom tpassin@mitretek.org
Fri, 1 Nov 2002 09:53:10 -0500


Johan L=FCbcke
Dirk Datzert wrote:
>=20
> |have you looked at the product KebasData ?
> |This product has an integrated cache function
> |and can parse HTML page for special information.
> |
> |I also heard a product called HTTPMounter or so.
> |
> Both KebasData and HTTPMounter use httplib to access the=20
> external server, but what happens while that request is=20
> handled? Will my Zope thread just be waiting idle, or can it=20
> handle other requests?
>=20

If you dispatch a thread, the dispatching function cannot do anything =
until that thread returns.  Or, more accurately, it may be able to do =
other things within the function body, like check on the thread's =
status, but it cannot actually return to its caller.  Thus one of Zope's =
threads - the one that called the external function that dispatched the =
thread(s), will be in use until your slow html site finally completes.  =
Medusa probably is using its own threads and will presumably be able to =
continue operating, as long as Zope has threads left to work with.

If you have to contact several such sites in one call to the external =
function, it could be worth it to contact each of them on a separate =
thread from within the same function.  Then they would all be going in =
parallel, which would end up being much faster even if the dispatching =
function cannot return until all the threads have completed. =20

Cheers,

Tom P