At 03:57 AM 1/25/2001 +0100, Tom Schwaller wrote:
>I'll try, right now I'm not sure about the complexity of
>this project. Thre are many things to consider, but
>probably one does not need them.
>
>Right now I'm trying all kind of approaches how to distribute
>the work between the TaskManager and the tasks themself.
>I favor the idea to let the taskmanager do the
>whole handling and the task do just one thing: Execute
>the task. But more intelligent tasks (eg. they know
>when to execute the next time, so the TaskManager
>can ask for that information) seems a better modell OOP wise.
>any hint welcome..
- I agree that TaskManager should do most the management while Tasks are
just responsive.
- I proposed a Task interface earlier. Here's a concise version:
class Task:
def __init__(self, mgr):
self._mgr = mgr
def run(self):
pass
def waitFor(self, delay):
def waitUntil(self, time):
The delay and time values could:
* float - number of seconds since epoch
* tuple - a localtime() like tuple
* DateTime - the object
waitUntil() would calculate the difference between now and then and invoke
waitFor(), which therefore becomes the "core" method.
The run() method must invoke waitFor() or waitUntil(), or it will not reappear.
I believe that fancier versions of Task could be built out of the above
core methods and that we could experiment quite a bit with TaskManager
without killing the above interface.
But I could be wrong...
> > That would be great. You can write the regression test suite too, if you
> > want! :-) Wasn't there someone on this list who said they were bored?
>
>:-)
>What do you want to be tested?
We already have a Testing context, but it's not automated. Each of the URLs
should be hit, the status should be checked (404 not found, 200 (?) OK,
etc.). More tests should be constructed to test the functionality of the
examples and other features like form fields, cookies, all the different
configuration settings, etc. I think HTTPSession is what you would use for
this part.
A higher level version of the test should run through various adapters
(OneShot, CGI, FastCGI, mod python, mod snake, etc.)
A secondary test should put the heat on with ApacheBench and various levels
of concurrency.
Ideally the tests would work with Apache/UNIX and IIS/Windows.
Until we have this, ensuring and improving stability are going to get
progressively harder as the software continues to grow and change.
>Normally I do not install Python alpha versions, but
>
>http://www.amk.ca/python/2.1/
>
>got me interested :-)
Really? The only real interesting thing on there to me was the weak
references and those aren't even in yet.
-Chuck
|