You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by Glen Daniels <gl...@thoughtcraft.com> on 2008/05/08 15:44:41 UTC
Re: [jira] Created: (SYNAPSE-291) pre-mediate sequence should not
be looked up from the registry
Hi Ruwan!
While the goal of the "pre-mediate" sequence is a fine one, I think the
name is unfortunate - Synapse is about mediation, and what goes *in* the
"pre-mediate" sequence? Mediators! :) So it's not really "pre"
mediation at all, it's more like a "global" or "master" sequence.
Second, the flow seems a little unclear now with yet another "automatic"
rule to the sequencing. An alternate idea: have a "master" sequence
which runs for every message, and a "handleProxyOrMessage" mediator in
there which is where the proxy/message mediation happens. That way you
could also put things *after* the proxy/message mediation (I'd think
people would want common post-processing almost as much as common
pre-processing).
So the default master sequence would be:
<sequence name="master">
<handleProxyOrMessage/>
</sequence>
And I'd be able to do:
<sequence name="master">
<log><property name="msg" value="In mediation"/></log>
<handleProxyOrMessage/>
<log><property name="msg" value="Leaving mediation"/></log>
</sequence>
What do you think?
Thanks,
--Glen
P.S. Re: the registry lookup - isn't the result cached?
Ruwan Linton (JIRA) wrote:
> pre-mediate sequence should not be looked up from the registry
> --------------------------------------------------------------
>
> Key: SYNAPSE-291
> URL: https://issues.apache.org/jira/browse/SYNAPSE-291
> Project: Synapse
> Issue Type: Bug
> Affects Versions: 1.2-QA-B1
> Environment: all envs
> Reporter: Ruwan Linton
> Priority: Critical
> Fix For: 1.2
>
>
> The newly added pre-mediate mandatory sequence causes registry lookup for each and every request if the pre-mediate sequence is not there in the local configuration. This leads to performance drawbacks and hence pre-mediate should only be looked up in the local configuration.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
Re: [jira] Created: (SYNAPSE-291) pre-mediate sequence should not
be looked up from the registry
Posted by "Asankha C. Perera" <as...@wso2.com>.
> P.S. Re: the registry lookup - isn't the result cached?
>
>
> Well, it does if there is a one. But if there is not a one, which is
> going to be the most common case will lead to registry lookup for each
> and every message received.
>
My proposal was that we need to 'cache' the result that we didn't find
anything in the registry - for the cache duration applicable at the
parent level for the search. This will make us only look again after
that same cache timeout period, to find that it doesn't exist still.. etc
asankha
Re: [jira] Created: (SYNAPSE-291) pre-mediate sequence should not be looked up from the registry
Posted by Ruwan Linton <ru...@gmail.com>.
Hi Glen,
On Thu, May 8, 2008 at 7:14 PM, Glen Daniels <gl...@thoughtcraft.com> wrote:
> Hi Ruwan!
>
> While the goal of the "pre-mediate" sequence is a fine one, I think the
> name is unfortunate - Synapse is about mediation, and what goes *in* the
> "pre-mediate" sequence? Mediators! :) So it's not really "pre" mediation
> at all, it's more like a "global" or "master" sequence.
I stated this when selecting the name (I mean, I stated that this name is
not the proper one but I couldn't find any meaning full one). We can use
master but that even does not imply the full meaning of the idea behind it.
>
>
> Second, the flow seems a little unclear now with yet another "automatic"
> rule to the sequencing. An alternate idea: have a "master" sequence which
> runs for every message, and a "handleProxyOrMessage" mediator in there which
> is where the proxy/message mediation happens. That way you could also put
> things *after* the proxy/message mediation (I'd think people would want
> common post-processing almost as much as common pre-processing).
I didn't get this point, how can this be applicable to post-processing?
>
>
> So the default master sequence would be:
>
> <sequence name="master">
> <handleProxyOrMessage/>
> </sequence>
>
> And I'd be able to do:
>
> <sequence name="master">
> <log><property name="msg" value="In mediation"/></log>
> <handleProxyOrMessage/>
> <log><property name="msg" value="Leaving mediation"/></log>
> </sequence>
>
> What do you think?
>
> Thanks,
> --Glen
>
> P.S. Re: the registry lookup - isn't the result cached?
Well, it does if there is a one. But if there is not a one, which is going
to be the most common case will lead to registry lookup for each and every
message received.
Thanks,
Ruwan
>
>
> Ruwan Linton (JIRA) wrote:
>
> > pre-mediate sequence should not be looked up from the registry
> > --------------------------------------------------------------
> >
> > Key: SYNAPSE-291
> > URL: https://issues.apache.org/jira/browse/SYNAPSE-291
> > Project: Synapse
> > Issue Type: Bug
> > Affects Versions: 1.2-QA-B1
> > Environment: all envs
> > Reporter: Ruwan Linton
> > Priority: Critical
> > Fix For: 1.2
> >
> >
> > The newly added pre-mediate mandatory sequence causes registry lookup
> > for each and every request if the pre-mediate sequence is not there in the
> > local configuration. This leads to performance drawbacks and hence
> > pre-mediate should only be looked up in the local configuration.
> >
> >
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
>
>
--
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"