[Zope-dev] Idea: Awaking Zope to Life

Leonardo Rochael Almeida leo@hiper.com.br
14 Oct 2002 12:45:11 -0200


On Sun, 2002-10-13 at 13:44, Ulrich Eck wrote:
> Hi there,
> 
> I just had an Idea and want to hear your comments on the following:
> 
> Zope is a Request-Based System. It has no internal scheduling functions
> except one installs Xron.
> 
> I have written a MicroThread Scheduler using python2.2 generators
> that supply cooperative Multithreading.
> 
> Now the point:
> 
> I want to integrate this Scheduler as one Thread (like Xron)
> to Zope as "Service" where clients could register a callback
> with parameters which are called regularly with a certain priority.
> 
> [...]
> 
> What are the pitfalls i can run into, when trying to implement this ??
> I could think of concurrency issues, problem with threads, context,
> security .. any concrete hints ??

Check your transaction boundaries. One of the reasons that most
solutions are based on an external request is that the Zope request
handler starts a transaction in the begining of the request and commits
it at the end (or rolls it back if there's an exception).

> 
> What do you think about that ??

Nice idea. It certainly opens a lot of possibilities (and maybe a huge
can of worms :-). Hope you can pull it off :-)

-- 
Ideas don't stay in some minds very long because they don't like
solitary confinement.