You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by Daniel Pereda <dp...@mobilitysol.com> on 2008/04/17 15:45:54 UTC

Re: Register mediators at execution time

Hi people!, i back to my project after several months, Asankha the first 
reason to registering mediators at runtime is because my application 
offer monitoring services for composites service in execution time. My 
aproach to do this, is use synapse esb to geneate proxy's to the 
monitorized services, so when a composite service is register to 
monitorize i generate all the configuracion for the services proxies, 
and with custom mediator obtain the necessary metrics (in this case 
response time and aviability). So the application change the composite 
service to call the proxys service generated and this proxy service 
bypass the message calling my mediators.

If i can't register in runtime the new process to monitorize i could 
lost information for the process that already are being monitorized.

Regards!


Asankha C. Perera wrote:
> Daniel
>
> I am not very clear on your requirement as a user.. if you could tell 
> us more about what you are trying to achieve my registering mediators 
> at runtime or the use case you are addressing maybe we could think 
> differently and comeup with a solution.
>
> asankha
>
> Daniel Pereda wrote:
>> Hi,
>> i was wondering if exists any way to re-charge the synapse 
>> configuration file (or add new one) without restart the server to add 
>> new mediators. I'm trying to build an application that take a 
>> composed service and register mediators for all the services used in 
>> the composed service in synapse.
>>
>> Exists any chance to do this?
>>
>> Regards!
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-user-help@ws.apache.org
>
>


-- 
A/C Daniel Pereda 
Mobility Solutions - http://www.mobilitysol.com
Fco. Araucho 1362, oficina 105, Montevideo, URUGUAY
Móvil (+598) 96 199 105
Teléfono (+598 2) 707 37 95, int 101
Fax (+598 2) 707 37 95, int 123


Re: Register mediators at execution time

Posted by Daniel Pereda <dp...@mobilitysol.com>.
Hi!, i will check WSO2, i try to found a solution with the less overhead 
possible, generate a custom mediator works but generate an overhead (2 
extra calls) unnecessary if the esb is registering this values.

Thanks again!

Asankha C. Perera wrote:
> Hi Daniel
>>    I did some tests to obtain the statistics that are registered in 
>> Synapse using JMX. The following are the Mbeans registered:
> My apologies, as the more useful JMX metrics are not yet available 
> with the Synapse distribution, but with the WSO2 ESB, which is 
> basically Synapse plus an admin console/JMX and better Registry 
> integration. Also, its under the same Apache v2.0 license, and thus 
> you could have a look.
>> The only attributes updated are MessagesReceived and BytesReceived, 
>> on my test i generate a proxy service with a custom mediator (the 
>> mediator is called perfectly). This beahavior is correct? Exists any 
>> way to obtain with this aproach the metric response time?
> Yes, we are constantly improving the JMX support over time, and the 
> transport level JMX information will not capture response times. This 
> additional information is part of the WSO2 ESB right now.
>
> However, your approach to compute the response time with a custom 
> mediator is perfectly fine, and you could use that as a base and build 
> your management/monitoring using that approach
>
> asankha
>


-- 
A/C Daniel Pereda 
Mobility Solutions - http://www.mobilitysol.com
Fco. Araucho 1362, oficina 105, Montevideo, URUGUAY
Móvil (+598) 96 199 105
Teléfono (+598 2) 707 37 95, int 101
Fax (+598 2) 707 37 95, int 123


Re: Register mediators at execution time

Posted by "Asankha C. Perera" <as...@wso2.com>.
Hi Daniel
>    I did some tests to obtain the statistics that are registered in 
> Synapse using JMX. The following are the Mbeans registered:
My apologies, as the more useful JMX metrics are not yet available with 
the Synapse distribution, but with the WSO2 ESB, which is basically 
Synapse plus an admin console/JMX and better Registry integration. Also, 
its under the same Apache v2.0 license, and thus you could have a look.
> The only attributes updated are MessagesReceived and BytesReceived, on 
> my test i generate a proxy service with a custom mediator (the 
> mediator is called perfectly). This beahavior is correct? Exists any 
> way to obtain with this aproach the metric response time?
Yes, we are constantly improving the JMX support over time, and the 
transport level JMX information will not capture response times. This 
additional information is part of the WSO2 ESB right now.

However, your approach to compute the response time with a custom 
mediator is perfectly fine, and you could use that as a base and build 
your management/monitoring using that approach

asankha

Re: Register mediators at execution time

Posted by Daniel Pereda <dp...@mobilitysol.com>.
Asankha,

    I did some tests to obtain the statistics that are registered in 
Synapse using JMX. The following are the Mbeans registered:

        - org.apache.synapse:Type=Transport,ConnectorName=nio-http
        - org.apache.synapse:Type=Transport,ConnectorName=nio-https in 
the version 1.1.1.

The attributes availables in nio-http are:

    1. MessagesReceived
    2. FaultsReceiving
    3. BytesReceived
    4. MessagesSent
    5. FaultsSending
    6 .BytesSent

    With this information i'm able to obtain the aviability metric but 
response time is not consider (and not deducible). Now i did some 
testing to check how the values are update, and when simulate a falling 
service (the final service down), the synapse log show a fault but the 
statistics are not updated (i expect that the faultreceiving variable 
increase your value but continue in -1).

The only attributes updated are MessagesReceived and BytesReceived, on 
my test i generate a proxy service with a custom mediator (the mediator 
is called perfectly). This beahavior is correct? Exists any way to 
obtain with this aproach the metric response time?

Any help is welcome, Thanks again!

Regards.

Asankha C. Perera wrote:
> Daniel
>>> This is great news! I will check this rigth now, this feature is 
>>> deployed in the 1.1.1 version?  I begin the search to locate the 
>>> MBeans that brings the service.
> Synapse 1.1.1 does not show the JMX URL to connect to at start up.. 
> Indika, we should show this as an INFO level message for 1.2 release
>
> But if you add the standard JMX properties to the command that starts 
> up the Java VM (e.g. adding "-Dcom.sun.management.jmxremote" into 
> synapse.sh) by editing the synapse.sh or the wrapper.conf (if using 
> the daemon script) this will work
>
> asankha
>


-- 
A/C Daniel Pereda 
Mobility Solutions - http://www.mobilitysol.com
Fco. Araucho 1362, oficina 105, Montevideo, URUGUAY
Móvil (+598) 96 199 105
Teléfono (+598 2) 707 37 95, int 101
Fax (+598 2) 707 37 95, int 123


Re: Register mediators at execution time

Posted by "Asankha C. Perera" <as...@wso2.com>.
Daniel
>> This is great news! I will check this rigth now, this feature is 
>> deployed in the 1.1.1 version?  I begin the search to locate the 
>> MBeans that brings the service.
Synapse 1.1.1 does not show the JMX URL to connect to at start up.. 
Indika, we should show this as an INFO level message for 1.2 release

But if you add the standard JMX properties to the command that starts up 
the Java VM (e.g. adding "-Dcom.sun.management.jmxremote" into 
synapse.sh) by editing the synapse.sh or the wrapper.conf (if using the 
daemon script) this will work

asankha

Re: Register mediators at execution time

Posted by Daniel Pereda <dp...@mobilitysol.com>.
Asankha C. Perera wrote:
> Daniel
>> My aproach to do this, is use synapse esb to geneate proxy's to the 
>> monitorized services, so when a composite service is register to 
>> monitorize i generate all the configuracion for the services proxies, 
>> and with custom mediator obtain the necessary metrics (in this case 
>> response time and aviability). So the application change the 
>> composite service to call the proxys service generated and this proxy 
>> service bypass the message calling my mediators.
> If what you require is just to get metrics on proxy services (such as 
> response time etc), we already do have a way to compute these 
> statistics. However, as Synapse does not have a administration console 
> yet, you are obviously not able to see these anywhere.. Indika did 
> some changes recently to make these statistics available over JMX. So 
> any proxy service you deploy at runtime will have its metrics 
> available over JMX. You may build your own console to use this 
> information or even take a look at the WSO2 ESB which has the ability 
> to display these metrics on its admin console 
> <http://wso2.org/project/esb/java/1.6/docs/administratorguide.html#Monitoring> 
> if that applies.
>
> asankha
>
This is great news! I will check this rigth now, this feature is 
deployed in the 1.1.1 version?  I begin the search to locate the MBeans 
that brings the service.

Thanks!!

-- 
A/C Daniel Pereda 
Mobility Solutions - http://www.mobilitysol.com
Fco. Araucho 1362, oficina 105, Montevideo, URUGUAY
Móvil (+598) 96 199 105
Teléfono (+598 2) 707 37 95, int 101
Fax (+598 2) 707 37 95, int 123


Re: Register mediators at execution time

Posted by "Asankha C. Perera" <as...@wso2.com>.
Daniel
> My aproach to do this, is use synapse esb to geneate proxy's to the 
> monitorized services, so when a composite service is register to 
> monitorize i generate all the configuracion for the services proxies, 
> and with custom mediator obtain the necessary metrics (in this case 
> response time and aviability). So the application change the composite 
> service to call the proxys service generated and this proxy service 
> bypass the message calling my mediators.
If what you require is just to get metrics on proxy services (such as 
response time etc), we already do have a way to compute these 
statistics. However, as Synapse does not have a administration console 
yet, you are obviously not able to see these anywhere.. Indika did some 
changes recently to make these statistics available over JMX. So any 
proxy service you deploy at runtime will have its metrics available over 
JMX. You may build your own console to use this information or even take 
a look at the WSO2 ESB which has the ability to display these metrics on 
its admin console 
<http://wso2.org/project/esb/java/1.6/docs/administratorguide.html#Monitoring> 
if that applies.

asankha