[Zope] Getting Zope to fetch info via HTTP
Johan Lübcke
johan.lubcke@appload.net
31 Oct 2002 09:15:29 +0100
On Thu, 2002-10-31 at 02:12, Bakhtiar A Hamid wrote:
> On Thursday 31 October 2002 05:49, Johan Lübcke wrote:
> > 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?
> >
> > ~ / Johan
>
> with KebasData, i use timeoutsocket.py to try and limit the time spent on=
> requests. however, this also affects other zope requests.
>
> i've looked at TimeoutSocket.py from cvs.zope.org. the operative word he=
re is
> look :P
>
> i havent yet found a good way of tackling this. any info, pointers welco=
me.
The problem I see is that the timeoutsocket has its own "select" call.
So in worst case we wait until the timeout doing nothing.
What one would like is to somehow call the poll function in asyncore
(The same way the Zope main loop does, so Zope is able to do usefull
stuff while we wait). But then, what should the callback be to be able
to continue again from the recv statement? (And what happens if we get
an exception from something done while we were sleeping...)
/ Johan