[PEAK] Interfaces

Phillip J. Eby pje at telecommunity.com
Fri Jul 7 12:23:14 EDT 2006


At 09:58 AM 7/7/2006 +0200, gabriel.j at telia.com wrote:
>Well I got RuleDispatch and PyProtocols installed now and played with
>it yesterday.
>One thing that I noticed is that it was simple enough to register
>stuff that should happen as that is what it was built for. I however
>have a few thoughts about removing code that has been registered.
>
>On PUB I would like for writers to be able to combine together objects
>that have been already written.
>RuleDispatch makes it easy as hell to create new checks on an object
>like adding a lock. However I want it to be just as easy to remove the
>same lock by removing a component.
>
>In my mind components will exist in a list on the object they react
>with and doing a delComponent should effectivly remove any trace of it.
>I have no idea how to do this with your RuleDispatch or even if it is
>meaningfull, there might be something I am missing but I believe that
>it would greatly add to the flexibility of our system instead of just
>changing it.

Not knowing the details of your system, I would assume you want rules of 
the form "if the such-and-such is on the so-and-so, then do X."  That is, 
make the conditional attachment part of the rule.

In more sophisticated forms of this approach, you would create a custom 
ICriterion and index implementation, to allow RuleDispatch to optimize such 
tests.




More information about the PEAK mailing list