Hi all,

 

I do think that "Synapse should control this instead of the mediation."

But a few afterthoughts:

---wouldn't re-evaluating all rules at this point be same as thinking that a new message is being processed?

 

For the new message injected into the system by synapse[on behalf of a mediation] or the mediation itself

 

 ---- There r two cases

*There might be a set of mediation rules for the other service which definitely needs to be done before accessing the other service (else it’s a breach of contract) 

 *Bypass the global rules for such messages[in case the global rule says..maintain count of incoming requests]

 

--- So a 'true' from the mediation(a state in the state-machine sense) would tell the engine to go forward in the particular branch of the state-machine and a 'false' would lead to the state-machine's initial state(i.e. revaluation of rules).[As if a new message has come in.]

 

--- Can somebody shed some light on how complex would it be for the engine to keep track of the rule that caused the mediation to be called (thus identify the property, or the 'special thing' thats important). Complexity in terms of both data and computation.

 

--- Also it will have to then keep track of all the decision points that had been passes in the state machine..[ It would implementation specific – but it definitely needs to hold this information]

 

Have a good day!

 

----- Original Message -----

From: ant elder
Sent: Wednesday, October 19, 2005 5:12 PM
Subject: Re: Rule Engine / Dispatcher

Ok I agree with you, it seems better not to re-evaluate all the matching rules. I guess the point I was debating is wouldn't it be nicer if Synapse controlled this instead of the mediator?

The Mediator is just like any regular mediator without using any special Synapse nonblocking API:

    public boolean mediate(Message m) {
         m.setTo("http://xmethods/stockquote");
         return true;
    }

And Synapse says, oh, you've changed wsa:to, thats one of those "special things", better make this a new request.

That way we can change our minds about what constitutes a "special thing" without having to change any mediator code, and we could maybe build some smarts into Synapse so that it can somehow check if any rules before the current rule were interested in a wsa:to of http://xmethods/stockquote and if not then this wouldn't have to be a new request. 

   ...ant

On 10/19/05, Paul Fremantle <[EMAIL PROTECTED]> wrote:
Ok. So is exactly the case where you want to say this is a new message. I agree with that scenario. But I still think that it helps limit the possibility of endless loops and improves the performance if the default behaviour is not to re-evaluate the matching rules between rules.


Pau

Reply via email to