RE: [Zope] Getting Zope to fetch info via HTTP
Johan Lübcke Dirk Datzert wrote:
|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 external server, but what happens while that request is handled? Will my Zope thread just be waiting idle, or can it handle other requests?
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. Cheers, Tom P
participants (1)
-
Passin, Tom