You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by "Mitchell, Jermaine" <Je...@tia.com> on 2013/09/18 07:59:50 UTC

Sharing Config Dir Between Several Synapse ESB's

Hi,

We are running synapse by configuring xml files (endpoints/proxy-services) in the repository/conf/synapse-config directory. Because of failure safety we would like to run further synapse esb's and share the configuration directory between these esb's. Therefor the hot update feature of the configuration directory should still be working and affect all running synapse esb's. We already looked at the sample 11 but we can't get the desired behavior. Is there a way to get this done?? Grateful for any help.

Thanks in advance.

Re: Sharing Config Dir Between Several Synapse ESB's

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
On Sep 23, 2013, at 3:06 AM, "Mitchell, Jermaine" <Je...@tia.com> wrote:

> Hi,
> 
> we placed the configuration files in a HTTP Server under (http://localhost/synapse-config/). But when trying to use the Simple URL registry by configuring the registry.xml ...
> 
> <registry xmlns="http://ws.apache.org/ns/synapse" provider="org.apache.synapse.registry.url.SimpleURLRegistry">
> <parameter name="root">http://localhost/synapse-config/</parameter>
> <parameter name="cachableDuration">15000</parameter>
> </registry>
> 
> ... this doesn't affect anything. Is there something missing?

I suppose you need to put your entire configuration as a single synapse.xml file in the HTTP server (similar to sample 11). This will not use regular hot deployment/update, but you should be able to dynamically update sequences and endpoints.

If you want to use regular hot deployment/update, you should use the SVN/Git based solution. This is probably the most elegant way to solve this problem in a distributed setting.

Thanks,
Hiranya

> 
> Thank you again for your help
> 
> -----Ursprüngliche Nachricht-----
> Von: Hiranya Jayathilaka [mailto:hiranya911@gmail.com] 
> Gesendet: Freitag, 20. September 2013 20:58
> An: user@synapse.apache.org
> Betreff: Re: Sharing Config Dir Between Several Synapse ESB's
> 
> 
> On Sep 19, 2013, at 11:54 PM, "Mitchell, Jermaine" <Je...@tia.com> wrote:
> 
>> Running the synapse instances on the same host would be enough in the test environment. But in terms of production environment the synapse instances should be able to run on different hosts in future. Which approach could you recommend considering best practices? How the synapse instances have to be configured regarding to the different approaches?
> 
> When running Synapse servers on the same machine, you can probably change the Synapse config directory location to point to the same directory. This can be done by modifying the synapse.sh file. Locate the following command and change accordingly:
> 
> # synapse config
> SYNAPSE_XML=$SYNAPSE_HOME/repository/conf/synapse-config
> 
> There are couple of approaches you can take to solve this problem in a distributed environment. You can use the Simple URL repository of Synapse to point to some shared HTTP server, and put your configuration files in the HTTP server. Or you can check-in your configurations to a SVN/Git repo and deploy a script in each host to periodically checkout/pull the configuration files. You can even write a Synapse task to do this.
> 
> WSO2 ESB, which is based on Synapse provides a more elegant solution to this problem called deployment synchronizer [1]. Feel free to check that out too.
> 
> Thanks,
> Hiranya
> 
> [1] - http://docs.wso2.org/display/ESB470/Introduction+to+Deployment+Synchronizer
> 
> 
>> 
>> Many thanks for your reply
>> 
>> -----Ursprüngliche Nachricht-----
>> Von: Hiranya Jayathilaka [mailto:hiranya911@gmail.com] 
>> Gesendet: Donnerstag, 19. September 2013 19:59
>> An: user@synapse.apache.org
>> Betreff: Re: Sharing Config Dir Between Several Synapse ESB's
>> 
>> Are you running all Synapse instances on the same host?
>> 
>> Thanks,
>> Hiranya
>> 
>> On Sep 17, 2013, at 10:59 PM, "Mitchell, Jermaine" <Je...@tia.com> wrote:
>> 
>>> Hi,
>>> 
>>> We are running synapse by configuring xml files (endpoints/proxy-services) in the repository/conf/synapse-config directory. Because of failure safety we would like to run further synapse esb's and share the configuration directory between these esb's. Therefor the hot update feature of the configuration directory should still be working and affect all running synapse esb's. We already looked at the sample 11 but we can't get the desired behavior. Is there a way to get this done?? Grateful for any help.
>>> 
>>> Thanks in advance.
>> 
>> --
>> Hiranya Jayathilaka
>> Mayhem Lab/RACE Lab;
>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>> Blog: http://techfeast-hiranya.blogspot.com
>> 
> 
> --
> Hiranya Jayathilaka
> Mayhem Lab/RACE Lab;
> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
> Blog: http://techfeast-hiranya.blogspot.com
> 

--
Hiranya Jayathilaka
Mayhem Lab/RACE Lab;
Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
Blog: http://techfeast-hiranya.blogspot.com


AW: Sharing Config Dir Between Several Synapse ESB's

Posted by "Mitchell, Jermaine" <Je...@tia.com>.
Hi,

we placed the configuration files in a HTTP Server under (http://localhost/synapse-config/). But when trying to use the Simple URL registry by configuring the registry.xml ...

<registry xmlns="http://ws.apache.org/ns/synapse" provider="org.apache.synapse.registry.url.SimpleURLRegistry">
<parameter name="root">http://localhost/synapse-config/</parameter>
<parameter name="cachableDuration">15000</parameter>
</registry>

... this doesn't affect anything. Is there something missing?

Thank you again for your help

-----Ursprüngliche Nachricht-----
Von: Hiranya Jayathilaka [mailto:hiranya911@gmail.com] 
Gesendet: Freitag, 20. September 2013 20:58
An: user@synapse.apache.org
Betreff: Re: Sharing Config Dir Between Several Synapse ESB's


On Sep 19, 2013, at 11:54 PM, "Mitchell, Jermaine" <Je...@tia.com> wrote:

> Running the synapse instances on the same host would be enough in the test environment. But in terms of production environment the synapse instances should be able to run on different hosts in future. Which approach could you recommend considering best practices? How the synapse instances have to be configured regarding to the different approaches?

When running Synapse servers on the same machine, you can probably change the Synapse config directory location to point to the same directory. This can be done by modifying the synapse.sh file. Locate the following command and change accordingly:

# synapse config
SYNAPSE_XML=$SYNAPSE_HOME/repository/conf/synapse-config

There are couple of approaches you can take to solve this problem in a distributed environment. You can use the Simple URL repository of Synapse to point to some shared HTTP server, and put your configuration files in the HTTP server. Or you can check-in your configurations to a SVN/Git repo and deploy a script in each host to periodically checkout/pull the configuration files. You can even write a Synapse task to do this.

WSO2 ESB, which is based on Synapse provides a more elegant solution to this problem called deployment synchronizer [1]. Feel free to check that out too.

Thanks,
Hiranya

[1] - http://docs.wso2.org/display/ESB470/Introduction+to+Deployment+Synchronizer


> 
> Many thanks for your reply
> 
> -----Ursprüngliche Nachricht-----
> Von: Hiranya Jayathilaka [mailto:hiranya911@gmail.com] 
> Gesendet: Donnerstag, 19. September 2013 19:59
> An: user@synapse.apache.org
> Betreff: Re: Sharing Config Dir Between Several Synapse ESB's
> 
> Are you running all Synapse instances on the same host?
> 
> Thanks,
> Hiranya
> 
> On Sep 17, 2013, at 10:59 PM, "Mitchell, Jermaine" <Je...@tia.com> wrote:
> 
>> Hi,
>> 
>> We are running synapse by configuring xml files (endpoints/proxy-services) in the repository/conf/synapse-config directory. Because of failure safety we would like to run further synapse esb's and share the configuration directory between these esb's. Therefor the hot update feature of the configuration directory should still be working and affect all running synapse esb's. We already looked at the sample 11 but we can't get the desired behavior. Is there a way to get this done?? Grateful for any help.
>> 
>> Thanks in advance.
> 
> --
> Hiranya Jayathilaka
> Mayhem Lab/RACE Lab;
> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
> Blog: http://techfeast-hiranya.blogspot.com
> 

--
Hiranya Jayathilaka
Mayhem Lab/RACE Lab;
Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
Blog: http://techfeast-hiranya.blogspot.com


Re: Sharing Config Dir Between Several Synapse ESB's

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
On Sep 19, 2013, at 11:54 PM, "Mitchell, Jermaine" <Je...@tia.com> wrote:

> Running the synapse instances on the same host would be enough in the test environment. But in terms of production environment the synapse instances should be able to run on different hosts in future. Which approach could you recommend considering best practices? How the synapse instances have to be configured regarding to the different approaches?

When running Synapse servers on the same machine, you can probably change the Synapse config directory location to point to the same directory. This can be done by modifying the synapse.sh file. Locate the following command and change accordingly:

# synapse config
SYNAPSE_XML=$SYNAPSE_HOME/repository/conf/synapse-config

There are couple of approaches you can take to solve this problem in a distributed environment. You can use the Simple URL repository of Synapse to point to some shared HTTP server, and put your configuration files in the HTTP server. Or you can check-in your configurations to a SVN/Git repo and deploy a script in each host to periodically checkout/pull the configuration files. You can even write a Synapse task to do this.

WSO2 ESB, which is based on Synapse provides a more elegant solution to this problem called deployment synchronizer [1]. Feel free to check that out too.

Thanks,
Hiranya

[1] - http://docs.wso2.org/display/ESB470/Introduction+to+Deployment+Synchronizer


> 
> Many thanks for your reply
> 
> -----Ursprüngliche Nachricht-----
> Von: Hiranya Jayathilaka [mailto:hiranya911@gmail.com] 
> Gesendet: Donnerstag, 19. September 2013 19:59
> An: user@synapse.apache.org
> Betreff: Re: Sharing Config Dir Between Several Synapse ESB's
> 
> Are you running all Synapse instances on the same host?
> 
> Thanks,
> Hiranya
> 
> On Sep 17, 2013, at 10:59 PM, "Mitchell, Jermaine" <Je...@tia.com> wrote:
> 
>> Hi,
>> 
>> We are running synapse by configuring xml files (endpoints/proxy-services) in the repository/conf/synapse-config directory. Because of failure safety we would like to run further synapse esb's and share the configuration directory between these esb's. Therefor the hot update feature of the configuration directory should still be working and affect all running synapse esb's. We already looked at the sample 11 but we can't get the desired behavior. Is there a way to get this done?? Grateful for any help.
>> 
>> Thanks in advance.
> 
> --
> Hiranya Jayathilaka
> Mayhem Lab/RACE Lab;
> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
> Blog: http://techfeast-hiranya.blogspot.com
> 

--
Hiranya Jayathilaka
Mayhem Lab/RACE Lab;
Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
Blog: http://techfeast-hiranya.blogspot.com


AW: Sharing Config Dir Between Several Synapse ESB's

Posted by "Mitchell, Jermaine" <Je...@tia.com>.
Running the synapse instances on the same host would be enough in the test environment. But in terms of production environment the synapse instances should be able to run on different hosts in future. Which approach could you recommend considering best practices? How the synapse instances have to be configured regarding to the different approaches?

Many thanks for your reply

-----Ursprüngliche Nachricht-----
Von: Hiranya Jayathilaka [mailto:hiranya911@gmail.com] 
Gesendet: Donnerstag, 19. September 2013 19:59
An: user@synapse.apache.org
Betreff: Re: Sharing Config Dir Between Several Synapse ESB's

Are you running all Synapse instances on the same host?

Thanks,
Hiranya

On Sep 17, 2013, at 10:59 PM, "Mitchell, Jermaine" <Je...@tia.com> wrote:

> Hi,
> 
> We are running synapse by configuring xml files (endpoints/proxy-services) in the repository/conf/synapse-config directory. Because of failure safety we would like to run further synapse esb's and share the configuration directory between these esb's. Therefor the hot update feature of the configuration directory should still be working and affect all running synapse esb's. We already looked at the sample 11 but we can't get the desired behavior. Is there a way to get this done?? Grateful for any help.
> 
> Thanks in advance.

--
Hiranya Jayathilaka
Mayhem Lab/RACE Lab;
Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
Blog: http://techfeast-hiranya.blogspot.com


Re: Sharing Config Dir Between Several Synapse ESB's

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
Are you running all Synapse instances on the same host?

Thanks,
Hiranya

On Sep 17, 2013, at 10:59 PM, "Mitchell, Jermaine" <Je...@tia.com> wrote:

> Hi,
> 
> We are running synapse by configuring xml files (endpoints/proxy-services) in the repository/conf/synapse-config directory. Because of failure safety we would like to run further synapse esb's and share the configuration directory between these esb's. Therefor the hot update feature of the configuration directory should still be working and affect all running synapse esb's. We already looked at the sample 11 but we can't get the desired behavior. Is there a way to get this done?? Grateful for any help.
> 
> Thanks in advance.

--
Hiranya Jayathilaka
Mayhem Lab/RACE Lab;
Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
Blog: http://techfeast-hiranya.blogspot.com