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 <ru...@gmail.com> on 2007/03/08 10:16:59 UTC

Issue in send mediator

Hi,

It is very easy to resolve the issue "Synapse Send mediator should not stop
mediation" https://issues.apache.org/jira/browse/SYNAPSE-57 (just have to
return true after send execution), but this will reveal in a serious issue
if another send mediator is executed along in the path of in message
mediation which will result in multiple responses for a given message.

One option is to send back the first response and drop all the other
reponses. But I think, Synapse should give the opportunity of handling
multiple responses, to the user who configures synapse to send multiple
requests to different endpoints, without taking intelligent decision to send
back only one and drop other messages. Currently, Synapse configuration does
not allow this kind of a behaviour. So I propose the following configuration
enhancement for the send mediator.

<send outSequence="key"> ... </send>

Also it is better if the user has some means of controlling this continue
after send behaviour explicitly. So we can add one more attribute as
"continue" which will be true or false depending on whether he/she wants to
continue after send or not. So that the overall send mediator configuration
will be as follows..

<send outSequence="key" continue=[true|false]> .... </send>

Any comments....

Thanks,
Ruwan.

-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

Re: Issue in send mediator

Posted by Paul Fremantle <pz...@gmail.com>.
> You disagree that its implementable later as an augmentation of what we
> have now, or you disagree with my view that it should be done later?

I think this is something we should consider pre-1.0.


> > This seems so similar to the things we've done in Axis2 for
> > nonBlocking calls that I think its a useful addition. I'm +1 unless it
> > delays our 1.0.

> Axis2 has several
> things I'd like to retract but its too late now. I'm trying to find a way
> to avoid that .. so just because Axis2 has made mistakes that's no reason
> to repeat it! :)

I agree in general, but I don't imagine that you think the
asynchronous API in Axis2 is one of those mistakes.

I think there is a pretty reasonable requirement here. I'm sending a
request out and I want the response handled in a certain way. We have
that with the proxy services, but not with the general rules. We added
it to the proxy services because we needed it. I think we need it in
the "main" mediator scenario too.

Paul
>
> Sanjiva.
> --
> Sanjiva Weerawarana, Ph.D.
> Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
> Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
> Director; Open Source Initiative; http://www.opensource.org/
> Member; Apache Software Foundation; http://www.apache.org/
> Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>


-- 
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

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


Re: Issue in send mediator

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
Paul Fremantle wrote:
> Ruwan
> 
> There is no point in doing the continue, because you can always follow
> up the <send/> with a <drop/>.
> 
> As regards outSequence I don't agree with Sanjiva :-)

You disagree that its implementable later as an augmentation of what we 
have now, or you disagree with my view that it should be done later?

> This seems so similar to the things we've done in Axis2 for
> nonBlocking calls that I think its a useful addition. I'm +1 unless it
> delays our 1.0.

My experience has always been that when we go beyond real requirements we 
end up hurting ourselves; its *always* possible to create fictitious 
requirements of course ("imagine a scenario where ..."). Axis2 has several 
things I'd like to retract but its too late now. I'm trying to find a way 
to avoid that .. so just because Axis2 has made mistakes that's no reason 
to repeat it! :)

Sanjiva.
-- 
Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
Director; Open Source Initiative; http://www.opensource.org/
Member; Apache Software Foundation; http://www.apache.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

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


Re: Issue in send mediator

Posted by "Asankha C. Perera" <as...@wso2.com>.
Paul
> There is no point in doing the continue, because you can always follow
> up the <send/> with a <drop/>.
Agreed.

However somehow I feel that it is the more common case, and hence it 
should be easier to write a stopping send than a send that does not stop 
but continues..

asankha

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


Re: Issue in send mediator

Posted by Paul Fremantle <pz...@gmail.com>.
Ruwan

There is no point in doing the continue, because you can always follow
up the <send/> with a <drop/>.

As regards outSequence I don't agree with Sanjiva :-)

This seems so similar to the things we've done in Axis2 for
nonBlocking calls that I think its a useful addition. I'm +1 unless it
delays our 1.0.

Paul

On 3/8/07, Sanjiva Weerawarana <sa...@opensource.lk> wrote:
> Definitely an interesting idea but can we do this after we get user
> feedback from a 1.0 release? This seems like a clear augmentation of
> function- so if we in 1.0 send the first response and log the rest then
> that's a start IMO.
>
> Trying to apply principle of least power [1] and [2].
>
> Sanjiva.
> [1] http://www.w3.org/DesignIssues/Principles.html
> [2] http://www.w3.org/2001/tag/doc/leastPower
>
> Ruwan Linton wrote:
> > Hi,
> >
> > It is very easy to resolve the issue "Synapse Send mediator should not
> > stop mediation" https://issues.apache.org/jira/browse/SYNAPSE-57 (just
> > have to return true after send execution), but this will reveal in a
> > serious issue if another send mediator is executed along in the path of
> > in message mediation which will result in multiple responses for a given
> > message.
> >
> > One option is to send back the first response and drop all the other
> > reponses. But I think, Synapse should give the opportunity of handling
> > multiple responses, to the user who configures synapse to send multiple
> > requests to different endpoints, without taking intelligent decision to
> > send back only one and drop other messages. Currently, Synapse
> > configuration does not allow this kind of a behaviour. So I propose the
> > following configuration enhancement for the send mediator.
> >
> > <send outSequence="key"> ... </send>
> >
> > Also it is better if the user has some means of controlling this
> > continue after send behaviour explicitly. So we can add one more
> > attribute as "continue" which will be true or false depending on whether
> > he/she wants to continue after send or not. So that the overall send
> > mediator configuration will be as follows..
> >
> > <send outSequence="key" continue=[true|false]> .... </send>
> >
> > Any comments....
> >
> > Thanks,
> > Ruwan.
> >
> > --
> > Ruwan Linton
> > http://www.wso2.org <http://www.wso2.org> - "Oxygenating the Web
> > Services Platform"
>
> --
> Sanjiva Weerawarana, Ph.D.
> Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
> Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
> Director; Open Source Initiative; http://www.opensource.org/
> Member; Apache Software Foundation; http://www.apache.org/
> Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>


-- 
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

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


Re: Issue in send mediator

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
Definitely an interesting idea but can we do this after we get user 
feedback from a 1.0 release? This seems like a clear augmentation of 
function- so if we in 1.0 send the first response and log the rest then 
that's a start IMO.

Trying to apply principle of least power [1] and [2].

Sanjiva.
[1] http://www.w3.org/DesignIssues/Principles.html
[2] http://www.w3.org/2001/tag/doc/leastPower

Ruwan Linton wrote:
> Hi,
> 
> It is very easy to resolve the issue "Synapse Send mediator should not 
> stop mediation" https://issues.apache.org/jira/browse/SYNAPSE-57 (just 
> have to return true after send execution), but this will reveal in a 
> serious issue if another send mediator is executed along in the path of 
> in message mediation which will result in multiple responses for a given 
> message.
> 
> One option is to send back the first response and drop all the other 
> reponses. But I think, Synapse should give the opportunity of handling 
> multiple responses, to the user who configures synapse to send multiple 
> requests to different endpoints, without taking intelligent decision to 
> send back only one and drop other messages. Currently, Synapse 
> configuration does not allow this kind of a behaviour. So I propose the 
> following configuration enhancement for the send mediator.
> 
> <send outSequence="key"> ... </send>
> 
> Also it is better if the user has some means of controlling this 
> continue after send behaviour explicitly. So we can add one more 
> attribute as "continue" which will be true or false depending on whether 
> he/she wants to continue after send or not. So that the overall send 
> mediator configuration will be as follows..
> 
> <send outSequence="key" continue=[true|false]> .... </send>
> 
> Any comments....
> 
> Thanks,
> Ruwan.
> 
> -- 
> Ruwan Linton
> http://www.wso2.org <http://www.wso2.org> - "Oxygenating the Web 
> Services Platform"

-- 
Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
Director; Open Source Initiative; http://www.opensource.org/
Member; Apache Software Foundation; http://www.apache.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

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