[Zope-dev] Xron fragility

Loren Stafford lstaffor@dynalogic.com
Thu, 12 Oct 2000 11:04:21 -0700


> > What if you want a small job to be done every 30 seconds?
>
> I generally don't... I'm satisfied with cron granularity, although
others
> might not be.  Do you have this requirement?

I thought a little about the granularity issue and decided to go with
the most general solution. I have no requirement for 30-second
intervals, but I wanted to avoid support requests from those who might
have such a need.

Also, I have no need for large numbers of scheduled methods. But I used
a heavy-duty data structure (Catalog) and the sleeping dispatcher model,
just so there would be no arbitrary limits that would cause me support
headaches later.

>
> > > > It uses Client.py to run a job.
> > >
> > > Why is this?  This doesn't make any sense to me on its face.  Why
not
> just
> > > call the method from a separate thread?
> >
> > Which separate thread? Do you create a new ZODB thread? That sounds
as
> > if it might use quite a few resources.
> >
> > Is there a Zope API for making ZODB threads call methods on objects,
as
> > signalled by other threads? I'm guessing the easiest way to do that
is
> > to use Client.py to make a new http request.
>

Yes, using Client.py was the easiest way to do that. The biggest problem
with Client.py is its dependency on HTTP. If your server is set up to
only accept HTTPS, then you can't use Xron -- not a desirable trade-off.
We need another mechanism that achieves the same goal -- simulating the
environment of a request -- without going all the way back to the
socket.

-- Loren