You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Ruwan Linton (JIRA)" <ji...@apache.org> on 2008/05/07 08:53:55 UTC

[jira] Created: (SYNAPSE-291) pre-mediate sequence should not be looked up from the registry

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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
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"

Re: [jira] Created: (SYNAPSE-291) pre-mediate sequence should not be looked up from the registry

Posted by Glen Daniels <gl...@thoughtcraft.com>.
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


[jira] Assigned: (SYNAPSE-291) pre-mediate sequence should not be looked up from the registry

Posted by "Ruwan Linton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ruwan Linton reassigned SYNAPSE-291:
------------------------------------

    Assignee: Ruwan Linton

> 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
>            Assignee: 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Resolved: (SYNAPSE-291) pre-mediate sequence should not be looked up from the registry

Posted by "Ruwan Linton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ruwan Linton resolved SYNAPSE-291.
----------------------------------

    Resolution: Fixed

Fixed on the SVN trunk

> 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
>            Assignee: 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-291) pre-mediate sequence should not be looked up from the registry

Posted by "Ruwan Linton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594817#action_12594817 ] 

Ruwan Linton commented on SYNAPSE-291:
--------------------------------------

Fixing this will limit the ability to dynamically loading the pre-mediate sequence. In other wards pre-mediate sequence has to be specified in the local configuration for it to be act as the mandatory sequence for all messages.

I think dynamic nature over performance is negligible and to improve performance we can drop it. Being said that there is no barrier for you to put a pre-mediate sequence and refer a sequence in the registry from within the pre-mediate sequence which again brings the dynamic nature through the referred sequence.

> 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
>            Assignee: 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org