You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Supun Kamburugamuva (JIRA)" <ji...@apache.org> on 2009/11/07 11:05:32 UTC

[jira] Created: (SYNAPSE-593) Specifying a receiving sequence for sent messages

Specifying a receiving sequence for sent messages 
--------------------------------------------------

                 Key: SYNAPSE-593
                 URL: https://issues.apache.org/jira/browse/SYNAPSE-593
             Project: Synapse
          Issue Type: New Feature
          Components: Core
            Reporter: Supun Kamburugamuva


If a receiving sequence is specified for send mediator, the response can be directed to this sequence. This way we can achieve service chaining with normal non-blocking transport calls. 

I'm attaching a patch that introduce this feature. Please have a look and provide your feed back. 

-- 
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] Updated: (SYNAPSE-593) Specifying a receiving sequence for sent messages

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

Supun Kamburugamuva updated SYNAPSE-593:
----------------------------------------

    Attachment: synapse_service_chaining.patch

A patch attached.

> Specifying a receiving sequence for sent messages 
> --------------------------------------------------
>
>                 Key: SYNAPSE-593
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-593
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Supun Kamburugamuva
>         Attachments: synapse_service_chaining.patch
>
>
> If a receiving sequence is specified for send mediator, the response can be directed to this sequence. This way we can achieve service chaining with normal non-blocking transport calls. 
> I'm attaching a patch that introduce this feature. Please have a look and provide your feed back. 

-- 
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-593) Specifying a receiving sequence for sent messages

Posted by "Supun Kamburugamuva (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774867#action_12774867 ] 

Supun Kamburugamuva commented on SYNAPSE-593:
---------------------------------------------

Yes I thought about this approach as well. But if we want to call several services based on the previous result then we have to implement a complex logic in the out mediator to filter out what are the responses for the particular request messages. 

But with my approach the logic is clean and easy to implement. Also in some cases we may not be able to determine what are the responses for some requests. 

The way service chaining done in the example you've mentioned seems like a hacked up way. Not something supported and embraced by synapse. 

Thanks,
Supun..

> Specifying a receiving sequence for sent messages 
> --------------------------------------------------
>
>                 Key: SYNAPSE-593
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-593
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Supun Kamburugamuva
>         Attachments: synapse_service_chaining.patch
>
>
> If a receiving sequence is specified for send mediator, the response can be directed to this sequence. This way we can achieve service chaining with normal non-blocking transport calls. 
> I'm attaching a patch that introduce this feature. Please have a look and provide your feed back. 

-- 
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-593) Specifying a receiving sequence for sent messages

Posted by "Supun Kamburugamuva (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865576#action_12865576 ] 

Supun Kamburugamuva commented on SYNAPSE-593:
---------------------------------------------

Let me explain my thinking in bit more detail.

What I wanted to say was in Synapse mediation, we have the response receiving places predefined. For message mediation this place is main sequence and for proxy services this place is outSequence.  

I'm not suggesting to change the existing behavior. I'm simply suggesting to extend the existing behavior by letting users choose the response receiving place optionally if they require it (for example for service chaining).

If we look at the current approach for service chaining and the suggested approach in this Jira, it is pretty clear that the existing approach is very hard to understand.

I would like to repeat that this is totally optional. Users will use this only when they require it. So I don't think this optional feature will affect the existing behavior in any way. rather it will make the synapse configuration language more powerful. 

Thanks,
Supun..






 

> Specifying a receiving sequence for sent messages 
> --------------------------------------------------
>
>                 Key: SYNAPSE-593
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-593
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Supun Kamburugamuva
>            Assignee: Supun Kamburugamuva
>         Attachments: synapse_service_chaining.patch
>
>
> If a receiving sequence is specified for send mediator, the response can be directed to this sequence. This way we can achieve service chaining with normal non-blocking transport calls. 
> I'm attaching a patch that introduce this feature. Please have a look and provide your feed back. 

-- 
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] Assigned: (SYNAPSE-593) Specifying a receiving sequence for sent messages

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

Supun Kamburugamuva reassigned SYNAPSE-593:
-------------------------------------------

    Assignee: Supun Kamburugamuva

> Specifying a receiving sequence for sent messages 
> --------------------------------------------------
>
>                 Key: SYNAPSE-593
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-593
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Supun Kamburugamuva
>            Assignee: Supun Kamburugamuva
>         Attachments: synapse_service_chaining.patch
>
>
> If a receiving sequence is specified for send mediator, the response can be directed to this sequence. This way we can achieve service chaining with normal non-blocking transport calls. 
> I'm attaching a patch that introduce this feature. Please have a look and provide your feed back. 

-- 
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-593) Specifying a receiving sequence for sent messages

Posted by "Supun Kamburugamuva (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865425#action_12865425 ] 

Supun Kamburugamuva commented on SYNAPSE-593:
---------------------------------------------

I would like to commit this and get this feature to working. Please shout if there are any objections.

> Specifying a receiving sequence for sent messages 
> --------------------------------------------------
>
>                 Key: SYNAPSE-593
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-593
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Supun Kamburugamuva
>            Assignee: Supun Kamburugamuva
>         Attachments: synapse_service_chaining.patch
>
>
> If a receiving sequence is specified for send mediator, the response can be directed to this sequence. This way we can achieve service chaining with normal non-blocking transport calls. 
> I'm attaching a patch that introduce this feature. Please have a look and provide your feed back. 

-- 
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-593) Specifying a receiving sequence for sent messages

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

Ruwan Linton commented on SYNAPSE-593:
--------------------------------------

I am sorry, I didn't get you.

What do you mean by predefine, and what does your patch do to change the behavior of predefining the receiving point, even though the receiving points for the main sequence is hard coded (is this what you mean by predefined??), for proxy services it is not. It is a configuration.

We have only one request receiving point for message mediation (if it is not a proxy), which is main sequence, why do we want to change the receiving point for response for message mediation.

To me this makes it complex to understand the configuration.

Folks, one of the key advantages of the synapse is its configuration language and the simplicity of the configuration model, I am not for sacrificing the simplicity... that is why I don't like making the inlined endpoints to have a mandatory name as well. (discussed on another thread)

One could argue on the fact that for message chaining scenario it makes it easy, but it makes it complex to understand the overall design on the message flow.

> Specifying a receiving sequence for sent messages 
> --------------------------------------------------
>
>                 Key: SYNAPSE-593
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-593
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Supun Kamburugamuva
>            Assignee: Supun Kamburugamuva
>         Attachments: synapse_service_chaining.patch
>
>
> If a receiving sequence is specified for send mediator, the response can be directed to this sequence. This way we can achieve service chaining with normal non-blocking transport calls. 
> I'm attaching a patch that introduce this feature. Please have a look and provide your feed back. 

-- 
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-593) Specifying a receiving sequence for sent messages

Posted by "Supun Kamburugamuva (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865612#action_12865612 ] 

Supun Kamburugamuva commented on SYNAPSE-593:
---------------------------------------------

This outSequence foo is defined by the user and user decides, for some messages coming in to the inSequence he/she don't want to invoke the outSequence and wants to execute another sequence. So this configuration is totally up to the user. This is exactly why I said this configuration creates a powerful language rather than complicating it. 

I'm not saying this patch is ideal for anything :). There may be better solutions. But right now I see this as a good solution. That is why I wanted to push this. Anyway I'm 100% open to any new ideas.

> Specifying a receiving sequence for sent messages 
> --------------------------------------------------
>
>                 Key: SYNAPSE-593
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-593
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Supun Kamburugamuva
>            Assignee: Supun Kamburugamuva
>         Attachments: synapse_service_chaining.patch
>
>
> If a receiving sequence is specified for send mediator, the response can be directed to this sequence. This way we can achieve service chaining with normal non-blocking transport calls. 
> I'm attaching a patch that introduce this feature. Please have a look and provide your feed back. 

-- 
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-593) Specifying a receiving sequence for sent messages

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

Ruwan Linton commented on SYNAPSE-593:
--------------------------------------

Supun,

This patch violates the proxy service semantics, and introduces a bit of complexity into the configuration.

When a user creates a proxy the user expects the message to be mediated via inSeqeuence and the response to be mediated via the outSequence. If there is a receiving sequence specified in the send mediator in the inSequence the functionality violates the above semantic.

I am OK with the idea of receiving sequence in general, but -1 for applying this patch. We need to work on this a bit more to get this right so that it doesn't conflict the original concepts of synapse.

I will try to modify the implementation when I get some free time, or can you propose any changes to make sure there are no conflicts in the semantics.

Thanks,
Ruwan 

> Specifying a receiving sequence for sent messages 
> --------------------------------------------------
>
>                 Key: SYNAPSE-593
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-593
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Supun Kamburugamuva
>            Assignee: Supun Kamburugamuva
>         Attachments: synapse_service_chaining.patch
>
>
> If a receiving sequence is specified for send mediator, the response can be directed to this sequence. This way we can achieve service chaining with normal non-blocking transport calls. 
> I'm attaching a patch that introduce this feature. Please have a look and provide your feed back. 

-- 
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-593) Specifying a receiving sequence for sent messages

Posted by "Supun Kamburugamuva (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12876251#action_12876251 ] 

Supun Kamburugamuva commented on SYNAPSE-593:
---------------------------------------------

Still I believe this is an important feature. Is there a better way to do this? If somebody finds a better way please shout.

Thanks,
Supun..

> Specifying a receiving sequence for sent messages 
> --------------------------------------------------
>
>                 Key: SYNAPSE-593
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-593
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Supun Kamburugamuva
>            Assignee: Supun Kamburugamuva
>         Attachments: synapse_service_chaining.patch
>
>
> If a receiving sequence is specified for send mediator, the response can be directed to this sequence. This way we can achieve service chaining with normal non-blocking transport calls. 
> I'm attaching a patch that introduce this feature. Please have a look and provide your feed back. 

-- 
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-593) Specifying a receiving sequence for sent messages

Posted by "Supun Kamburugamuva (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865542#action_12865542 ] 

Supun Kamburugamuva commented on SYNAPSE-593:
---------------------------------------------

How about if we think of the semantics as following.

In Synapse at the moment we have defined the request receiving points and response receiving points. 

In case of main sequence, both request receiving and response receiving points are same (main sequence). So we have pre-defined the receiving point.

In case of proxy services, request is received by inSequence and response is received by outSequence. Both are pre-defined receiving points.

We can take both main sequence and proxy services response receiving points as pre-defined, default places. 

So my point is, specifying the receiving sequence overrides these pre-defined default receiving sequences. Having a receiving sequence is totally optional. So user has to use it only in complex scenarios.




   

> Specifying a receiving sequence for sent messages 
> --------------------------------------------------
>
>                 Key: SYNAPSE-593
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-593
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Supun Kamburugamuva
>            Assignee: Supun Kamburugamuva
>         Attachments: synapse_service_chaining.patch
>
>
> If a receiving sequence is specified for send mediator, the response can be directed to this sequence. This way we can achieve service chaining with normal non-blocking transport calls. 
> I'm attaching a patch that introduce this feature. Please have a look and provide your feed back. 

-- 
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-593) Specifying a receiving sequence for sent messages

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

Ruwan Linton commented on SYNAPSE-593:
--------------------------------------

No, when you have a proxy and the out sequence is foo, response of any message going out of the proxies inSequence is expected to be received by the sequence foo, but now with this patch, there could be a case where it doesn't get to the sequence foo, which makes the configuration hard to understand.

I agree we need a better model for service chaining, but what I am saying is this patch as it is would not be the ideal solution.

> Specifying a receiving sequence for sent messages 
> --------------------------------------------------
>
>                 Key: SYNAPSE-593
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-593
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Supun Kamburugamuva
>            Assignee: Supun Kamburugamuva
>         Attachments: synapse_service_chaining.patch
>
>
> If a receiving sequence is specified for send mediator, the response can be directed to this sequence. This way we can achieve service chaining with normal non-blocking transport calls. 
> I'm attaching a patch that introduce this feature. Please have a look and provide your feed back. 

-- 
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-593) Specifying a receiving sequence for sent messages

Posted by "indika priyantha kumara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774596#action_12774596 ] 

indika priyantha kumara commented on SYNAPSE-593:
-------------------------------------------------

Spun we can do the service chaining with synapse .  one resource is [1] which does the message chaining with a proxy service. You should be able to do same thing even with the main sequence (put response true property and call the new service endpoint within the out mediator). 

Could you please critically evaluate the existing approaches and your suggestions?   


[1]  http://adroitlogic.org/knowledge-base-synapse/11-message-chaining-with-synapse.html

> Specifying a receiving sequence for sent messages 
> --------------------------------------------------
>
>                 Key: SYNAPSE-593
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-593
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Supun Kamburugamuva
>         Attachments: synapse_service_chaining.patch
>
>
> If a receiving sequence is specified for send mediator, the response can be directed to this sequence. This way we can achieve service chaining with normal non-blocking transport calls. 
> I'm attaching a patch that introduce this feature. Please have a look and provide your feed back. 

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