directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <aok...@bellsouth.net>
Subject Re: clarifications of ideas regarding stage predicates
Date Mon, 13 Sep 2004 16:38:44 GMT
Cetin,

My comments are in line.  

On Mon, 2004-09-13 at 11:20, Cetin Karakus wrote:
> I would like to clarify some points regarding my ideas about predicates.
> What the contract of  Stage specifies is just that Predicate's can be
> added to it.
> Certainly, these predicates will be used somehow by the stage in order to decide
> whethet it will allow enqueue of a new event. So, my understanding is that
> enqueued predicates in a stage will all have a vote whether a given event going
> to be accepted to the stage. 
> Now, my suggessition is that since the current contract of stage only allows 
> the addition of predicates but no way of interacting with the
> predicates that have
> already been added to the stage, it is not possible to build complex boolean 
> expressions made up of the predicates that have already been added to the stage.
> What we need, IMHO, is to have a smart predicate collection accessible
> through stage
> interface that allows interaction with existing predicates using
> boolean expressions.
> 
> To illustrate this idea,
> We need to have something like this:
> <pre>
> public interface PredicateList
> {
> 	/**
> 	 *	Enqueue a given predicate with existing predicate list in a
> logical AND operation
> 	 */
> 	PredicateList andPredicate(Predicate pred);
> 	
> 
> 	/**
> 	 *	Enqueue a given predicate list with existing predicate list in a
> logical AND operation
> 	 */
> 	PredicateList andPredicate(PredicateList predList);
> 
> 	/**
> 	 *	Enqueue a given predicate with existing predicate list in a
> logical OR operation
> 	 */	
> 	PredicateList orPredicate(Predicate pred);
> 
> 	/**
> 	 *	Enqueue a given predicate list with existing predicate list in a
> logical OR operation
> 	 */	
> 	PredicateList orPredicate(PredicateList predList);
> 
> 	 /**
> 		*	Evaluate the boolean expression resulting from the logical structure
> 		* of enqueued predicates
> 	  */
> 	 boolean eval();
> }
> 
> </pre>

These are some really good points Cetin.  But it is not our goal to have
a fully expressive langauge for enqueue predicates.  Think about it for
a sec; we just want to control the types of events that can be put onto
the queue right?  It does not take much to control this and when it can
be done programatically and the result returned by the accept() this is
enough no?  What I'm saying is we want to keep this really simple even
trivial.

Please don't think this is shooting down your idea - I'm sooo glad some
one is actually posting their ideas to this list.  Thank you for
stepping up and doing that.  However I think we're ok with just a simple
boolean accept().  I will however watch to see if we need to change this
to accomodate complex behavoirs.  If so we can use your technique.

Thanks again,
Alex



Mime
View raw message