[Twisted-Python] How Twisted is This?

Brad Bollenbach brad at bbnet.ca
Wed Jul 16 12:24:01 EDT 2003

On Wed, Jul 16, 2003 at 03:52:50PM -0000, Moshe Zadka wrote:
> On Wed, 16 Jul 2003, Brad Bollenbach <brad at bbnet.ca> wrote:
> > * branded for the company I work for 
> I'm not sure what this means.

It means that the user interfaces will be branded for the company I work

> > * multiuser 
> I'm not sure what this mean either.

It means there will be more than one user that will use this service.

> > * offer various ways of verifying the uptime and integrity of content on
> > a site:
> > 
> >     i. Can I open an HTTP connection to this site?
> >     ii. Is "foo bar" present on the page that I've retrieved?
> >     iii. Is the page I've retrieved the same size as it was before?
> >     iv. Is Basic Auth still working with this username/password? (for
> >     pages that do Basic Auth, of course :)
> Look at twisted.web.monitor.
> Basically, most of this is fairly easy with Twisted.

This looks like a useful, albeit minimal, starting point.

> > I write a "monicron". monicron wakes up every five minutes and asks the
> > system "are there any monitors that need to be performed right now?" The
> > answer will either be "Yes, here's the monitors that need to be
> > performed right now" or "No".
> > 
> > If No, monicron will just go back to bed for another five minutes.
> > 
> > If the answer is Yes monicron will gather the monitors that need to be
> > run, and execute the all at once -- asyncronously. It would then need to
> > collect the results of all the monitors, and once they've all reported
> > back for a given site, send an error report if something went wrong.
> That sounds like the worst impelemntation strategy I could think
> of. Wouldn't it be saner to have each task have its own scheduling?

Well, you didn't say anything about what specifically seemed bad about
the (very generic description of an) implementation I mentioned, so
there's no point considering other alternatives without having at least
considered the first one.

The metaphor I suggested maps well into the Real World (e.g. think of a
SWAT team that has to enter and "clear" a building; each cell is
deployed to their own piece of the building, but all have to report back
to one central command, otherwise there's no way to know if there's an
"all clear" or not).

> > 2. If Yes, where should I start looking for the bits of the framework
> > that will make my task as easy as possible?
> Read the documentation?
> Seriously, read all of it. I can't imagine many parts which wouldn't
> be relevant.

Well, there's loads of it that's not relevant to my problem. A more
constructive pointer than "read all of it" would be useful, but I'll
look to more pragmatic sources to find that pointer. :)

Brad Bollenbach

More information about the Twisted-Python mailing list