You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Venkatesan, Kumaran" <Ku...@in.standardchartered.com> on 2008/02/04 09:37:36 UTC

Content based routing

Hi,

 

We are facing issue in routing requests. The requirement is to route the
hit on synapse to the services deployed on different host.

 

This could be achieved by content based routing, but the case is to
handle hundreds of services like below.

 

For example,

 

https://tradeti.std.com/services/updateUser (hit
<https://tradeti.std.com/services/updateUser%20(hit>  to synapse) to
https://10.192.12.89/services/updateUser (backend internal systems)

https://tradeti.std.com/services/addUser to
https://10.192.12.89/services/addUser

https://tradeti.std.com/services/deleteUser to
https://10.192.12.89/services/deleteUser etc.,

 



This email and any attachments are confidential and may also be privileged.  If you are not the addressee, do not disclose, copy, circulate or in any other way use or rely on the information contained in this email or any attachments.  If received in error, notify the sender immediately and delete this email and any attachments from your system.  Emails cannot be guaranteed to be secure or error free as the message and any attachments could be intercepted, corrupted, lost, delayed, incomplete or amended.  Standard Chartered PLC and its subsidiaries do not accept liability for damage caused by this email or any attachments and may monitor email traffic.

 

Standard Chartered PLC is incorporated in England with limited liability under company number 966425 and has its registered office at 1 Aldermanbury Square, London, EC2V 7SB.

 

Standard Chartered Bank ("SCB") is incorporated in England with limited liability by Royal Charter 1853, under reference ZC18.  The Principal Office of SCB is situated in England at 1 Aldermanbury Square, London EC2V 7SB. In the United Kingdom, SCB is authorised and regulated by the Financial Services Authority under FSA register number 114276.

 

If you are receiving this email from SCB outside the UK, please click http://www.standardchartered.com/global/email_disclaimer.html to refer to the information on other jurisdictions.

Re: Content based routing

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

Hi. If this is simply grabbing part of one URI and sending to another,
then this is pretty simple in Synapse.

You can do it two ways.
1) Using Xpath string manipulation functions
2) Using a very simple Java mediator

I'll knock something together and post it later today.

Paul

On Feb 4, 2008 8:37 AM, Venkatesan, Kumaran
<Ku...@in.standardchartered.com> wrote:
>
>
>
>
> Hi,
>
>
>
> We are facing issue in routing requests. The requirement is to route the hit
> on synapse to the services deployed on different host.
>
>
>
> This could be achieved by content based routing, but the case is to handle
> hundreds of services like below.
>
>
>
> For example,
>
>
>
> https://tradeti.stdcom/services/updateUser (hit to synapse) to
> https://10.192.12.89/services/updateUser (backend internal systems)
>
> https://tradeti.std.com/services/addUser to
> https://10.192.12.89/services/addUser
>
> https://tradeti.std.com/services/deleteUser to
> https://10.192.12.89/services/deleteUser etc.,
>
>
> This email and any attachments are confidential and may also be privileged.
> If you are not the addressee, do not disclose, copy, circulate or in any
> other way use or rely on the information contained in this email or any
> attachments. If received in error, notify the sender immediately and delete
> this email and any attachments from your system. Emails cannot be guaranteed
> to be secure or error free as the message and any attachments could be
> intercepted, corrupted, lost, delayed, incomplete or amended. Standard
> Chartered PLC and its subsidiaries do not accept liability for damage caused
> by this email or any attachments and may monitor email traffic.
>
>
>
>  Standard Chartered PLC is incorporated in England with limited liability
> under company number 966425 and has its registered office at 1 Aldermanbury
> Square, London, EC2V 7SB.
>
>
>
>  Standard Chartered Bank ("SCB") is incorporated in England with limited
> liability by Royal Charter 1853, under reference ZC18. The Principal Office
> of SCB is situated in England at 1 Aldermanbury Square, London EC2V 7SB. In
> the United Kingdom, SCB is authorised and regulated by the Financial
> Services Authority under FSA register number 114276.
>
>
>
>  If you are receiving this email from SCB outside the UK, please click
> http://www.standardchartered.com/global/email_disclaimer.html to refer to
> the information on other jurisdictions.
>



-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

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

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


Re: Content based routing

Posted by Upul Godage <up...@gmail.com>.
May be something like this will do.

<definitions xmlns="http://ws.apache.org/ns/synapse">
    <in>
        <header name="To" expression="fn:concat('https://10.192.12.89',
get-property('To'))"/>
    </in>

    <send/>
</definitions>

Upul

On Feb 4, 2008 2:07 PM, Venkatesan, Kumaran <
Kumaran.Venkatesan@in.standardchartered.com> wrote:

>  Hi,
>
>
>
> We are facing issue in routing requests. The requirement is to route the
> hit on synapse to the services deployed on different host.
>
>
>
> This could be achieved by content based routing, but the case is to handle
> hundreds of services like below.
>
>
>
> For example,
>
>
>
> https://tradeti.stdcom/services/updateUser (hit<https://tradeti.std.com/services/updateUser%20%28hit>to synapse) to
> https://10.192.12.89/services/updateUser (backend internal systems)
>
> https://tradeti.std.com/services/addUser to
> https://10.192.12.89/services/addUser
>
> https://tradeti.std.com/services/deleteUser to
> https://10.192.12.89/services/deleteUser etc.,
>
>
>  This email and any attachments are confidential and may also be
> privileged. If you are not the addressee, do not disclose, copy, circulate
> or in any other way use or rely on the information contained in this email
> or any attachments. If received in error, notify the sender immediately and
> delete this email and any attachments from your system. Emails cannot be
> guaranteed to be secure or error free as the message and any attachments
> could be intercepted, corrupted, lost, delayed, incomplete or amended.
> Standard Chartered PLC and its subsidiaries do not accept liability for
> damage caused by this email or any attachments and may monitor email
> traffic.
>
>
>
> Standard Chartered PLC is incorporated in England with limited liability
> under company number 966425 and has its registered office at 1 Aldermanbury
> Square, London, EC2V 7SB.
>
>
>
> Standard Chartered Bank ("SCB") is incorporated in England with limited
> liability by Royal Charter 1853, under reference ZC18. The Principal Office
> of SCB is situated in England at 1 Aldermanbury Square, London EC2V 7SB. In
> the United Kingdom, SCB is authorised and regulated by the Financial
> Services Authority under FSA register number 114276.
>
>
>
> If you are receiving this email from SCB outside the UK, please click
> http://www.standardchartered.com/global/email_disclaimer.html to refer to
> the information on other jurisdictions.
>

Re: Content based routing

Posted by Hadrian Zbarcea <hz...@gmail.com>.
Hi Paul,

How's life?

I am not qualifying things as right or wrong, but we certainly viewed  
things differently.  And thinking of it, Apache Camel didn't exist at  
the time :).  Btw, one notable change in my life: I am not in Boston  
anymore, but some 700 miles south, in NC.

Cheers,
Hadrian


On Feb 4, 2008, at 11:04 AM, Paul Fremantle wrote:

> Hadrian
>
> Nice to see you!
>
> I'm glad you are still around.
>
> Take a look at this --- you get the credit for it, and I guess I have
> to admit I was wrong :)
> https://svn.apache.org/repos/asf/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/util/PayloadHelper.java
>
> Paul
>
> On Feb 4, 2008 2:57 PM, Hadrian Zbarcea <hz...@gmail.com> wrote:
>> The easiest thing for this would be a simple two line configuration  
>> for
>> ProxyPass/ProxyPassReverse in an apache web server.  The
>> user@synapse.apache.org list is probably a better forum also :).
>> Cheers,
>> hadrian
>>
>>
>>
>> On Feb 4, 2008, at 3:37 AM, Venkatesan, Kumaran wrote:
>>
>>
>> Hi,
>>
>> We are facing issue in routing requests. The requirement is to  
>> route the hit
>> on synapse to the services deployed on different host.
>>
>> This could be achieved by content based routing, but the case is to  
>> handle
>> hundreds of services like below.
>>
>> For example,
>>
>> https://tradeti.stdcom/services/updateUser (hit to synapse) to
>> https://10.192.12.89/services/updateUser (backend internal systems)
>> https://tradeti.std.com/services/addUser to
>> https://10.192.12.89/services/addUser
>> https://tradeti.std.com/services/deleteUser to
>> https://10.192.12.89/services/deleteUser etc.,
>>
>> This email and any attachments are confidential and may also be  
>> privileged.
>> If you are not the addressee, do not disclose, copy, circulate or  
>> in any
>> other way use or rely on the information contained in this email or  
>> any
>> attachments. If received in error, notify the sender immediately  
>> and delete
>> this email and any attachments from your system. Emails cannot be  
>> guaranteed
>> to be secure or error free as the message and any attachments could  
>> be
>> intercepted, corrupted, lost, delayed, incomplete or amended.  
>> Standard
>> Chartered PLC and its subsidiaries do not accept liability for  
>> damage caused
>> by this email or any attachments and may monitor email traffic.
>>
>>
>>
>> Standard Chartered PLC is incorporated in England with limited  
>> liability
>> under company number 966425 and has its registered office at 1  
>> Aldermanbury
>> Square, London, EC2V 7SB.
>>
>>
>>
>> Standard Chartered Bank ("SCB") is incorporated in England with  
>> limited
>> liability by Royal Charter 1853, under reference ZC18. The  
>> Principal Office
>> of SCB is situated in England at 1 Aldermanbury Square, London EC2V  
>> 7SB. In
>> the United Kingdom, SCB is authorised and regulated by the Financial
>> Services Authority under FSA register number 114276.
>>
>>
>>
>> If you are receiving this email from SCB outside the UK, please click
>> http://www.standardchartered.com/global/email_disclaimer.html to  
>> refer to
>> the information on other jurisdictions.
>>
>>
>
>
>
> -- 
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> OASIS WS-RX TC Co-chair
>
> blog: http://pzf.fremantle.org
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
>


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


Re: Content based routing

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

Nice to see you!

I'm glad you are still around.

Take a look at this --- you get the credit for it, and I guess I have
to admit I was wrong :)
https://svn.apache.org/repos/asf/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/util/PayloadHelper.java

Paul

On Feb 4, 2008 2:57 PM, Hadrian Zbarcea <hz...@gmail.com> wrote:
> The easiest thing for this would be a simple two line configuration for
> ProxyPass/ProxyPassReverse in an apache web server.  The
> user@synapse.apache.org list is probably a better forum also :).
> Cheers,
> hadrian
>
>
>
> On Feb 4, 2008, at 3:37 AM, Venkatesan, Kumaran wrote:
>
>
> Hi,
>
> We are facing issue in routing requests. The requirement is to route the hit
> on synapse to the services deployed on different host.
>
> This could be achieved by content based routing, but the case is to handle
> hundreds of services like below.
>
> For example,
>
> https://tradeti.stdcom/services/updateUser (hit to synapse) to
> https://10.192.12.89/services/updateUser (backend internal systems)
> https://tradeti.std.com/services/addUser to
> https://10.192.12.89/services/addUser
> https://tradeti.std.com/services/deleteUser to
> https://10.192.12.89/services/deleteUser etc.,
>
> This email and any attachments are confidential and may also be privileged.
> If you are not the addressee, do not disclose, copy, circulate or in any
> other way use or rely on the information contained in this email or any
> attachments. If received in error, notify the sender immediately and delete
> this email and any attachments from your system. Emails cannot be guaranteed
> to be secure or error free as the message and any attachments could be
> intercepted, corrupted, lost, delayed, incomplete or amended. Standard
> Chartered PLC and its subsidiaries do not accept liability for damage caused
> by this email or any attachments and may monitor email traffic.
>
>
>
> Standard Chartered PLC is incorporated in England with limited liability
> under company number 966425 and has its registered office at 1 Aldermanbury
> Square, London, EC2V 7SB.
>
>
>
> Standard Chartered Bank ("SCB") is incorporated in England with limited
> liability by Royal Charter 1853, under reference ZC18. The Principal Office
> of SCB is situated in England at 1 Aldermanbury Square, London EC2V 7SB. In
> the United Kingdom, SCB is authorised and regulated by the Financial
> Services Authority under FSA register number 114276.
>
>
>
> If you are receiving this email from SCB outside the UK, please click
> http://www.standardchartered.com/global/email_disclaimer.html to refer to
> the information on other jurisdictions.
>
>



-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

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

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


Re: Content based routing

Posted by "Asankha C. Perera" <as...@wso2.com>.
Hadrian

Good to see you back on the Synapse lists!

asankha

Hadrian Zbarcea wrote:
> The easiest thing for this would be a simple two line configuration 
> for ProxyPass/ProxyPassReverse in an apache web server. 
>  The user@synapse.apache.org <ma...@synapse.apache.org> list is 
> probably a better forum also :).
> Cheers,
> hadrian
>
> On Feb 4, 2008, at 3:37 AM, Venkatesan, Kumaran wrote:
>
>> Hi,
>>  
>> We are facing issue in routing requests. The requirement is to route 
>> the hit on synapse to the services deployed on different host.
>>  
>> This could be achieved by content based routing, but the case is to 
>> handle hundreds of services like below.
>>  
>> For example,
>>  
>> https://tradeti.stdcom/services/updateUser (hit 
>> <https://tradeti.std.com/services/updateUser%20%28hit> to synapse) 
>> to https://10.192.12.89/services/updateUser (backend internal systems)
>> https://tradeti.std.com/services/addUser to https://10.192.12.89/services/addUser
>> https://tradeti.std.com/services/deleteUser to https://10.192.12.89/services/deleteUser etc.,
>>  
>> This email and any attachments are confidential and may also be 
>> privileged. If you are not the addressee, do not disclose, copy, 
>> circulate or in any other way use or rely on the information 
>> contained in this email or any attachments. If received in error, 
>> notify the sender immediately and delete this email and any 
>> attachments from your system. Emails cannot be guaranteed to be 
>> secure or error free as the message and any attachments could be 
>> intercepted, corrupted, lost, delayed, incomplete or amended. 
>> Standard Chartered PLC and its subsidiaries do not accept liability 
>> for damage caused by this email or any attachments and may monitor 
>> email traffic.
>>
>>
>>
>> Standard Chartered PLC is incorporated in England with limited 
>> liability under company number 966425 and has its registered office 
>> at 1 Aldermanbury Square, London, EC2V 7SB.
>>
>>
>>
>> Standard Chartered Bank ("SCB") is incorporated in England with 
>> limited liability by Royal Charter 1853, under reference ZC18. The 
>> Principal Office of SCB is situated in England at 1 Aldermanbury 
>> Square, London EC2V 7SB. In the United Kingdom, SCB is authorised and 
>> regulated by the Financial Services Authority under FSA register 
>> number 114276.
>>
>>
>>
>> If you are receiving this email from SCB outside the UK, please 
>> click http://www.standardchartered.com/global/email_disclaimer.html to 
>> refer to the information on other jurisdictions.
>>
>

Re: Content based routing

Posted by Hadrian Zbarcea <hz...@gmail.com>.
The easiest thing for this would be a simple two line configuration  
for ProxyPass/ProxyPassReverse in an apache web server.  The user@synapse.apache.org 
  list is probably a better forum also :).
Cheers,
hadrian

On Feb 4, 2008, at 3:37 AM, Venkatesan, Kumaran wrote:

> Hi,
>
> We are facing issue in routing requests. The requirement is to route  
> the hit on synapse to the services deployed on different host.
>
> This could be achieved by content based routing, but the case is to  
> handle hundreds of services like below.
>
> For example,
>
> https://tradeti.stdcom/services/updateUser (hit to synapse) to https://10.192.12.89/services/updateUser 
>  (backend internal systems)
> https://tradeti.std.com/services/addUser to https://10.192.12.89/services/addUser
> https://tradeti.std.com/services/deleteUser to https://10.192.12.89/services/deleteUser 
>  etc.,
>
> This email and any attachments are confidential and may also be  
> privileged. If you are not the addressee, do not disclose, copy,  
> circulate or in any other way use or rely on the information  
> contained in this email or any attachments. If received in error,  
> notify the sender immediately and delete this email and any  
> attachments from your system. Emails cannot be guaranteed to be  
> secure or error free as the message and any attachments could be  
> intercepted, corrupted, lost, delayed, incomplete or amended.  
> Standard Chartered PLC and its subsidiaries do not accept liability  
> for damage caused by this email or any attachments and may monitor  
> email traffic.
>
>
>
> Standard Chartered PLC is incorporated in England with limited  
> liability under company number 966425 and has its registered office  
> at 1 Aldermanbury Square, London, EC2V 7SB.
>
>
>
> Standard Chartered Bank ("SCB") is incorporated in England with  
> limited liability by Royal Charter 1853, under reference ZC18. The  
> Principal Office of SCB is situated in England at 1 Aldermanbury  
> Square, London EC2V 7SB. In the United Kingdom, SCB is authorised  
> and regulated by the Financial Services Authority under FSA register  
> number 114276.
>
>
>
> If you are receiving this email from SCB outside the UK, please  
> click http://www.standardchartered.com/global/email_disclaimer.html  
> to refer to the information on other jurisdictions.