You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by "Gunasekaran, Murali" <Mu...@softwareag.com> on 2008/02/23 16:14:15 UTC

Mediators vs Handlers

Hello Group,

We are currently debating using Synapse and are at crossroads over the implementation of certain things like auditing, consumer identification as mediators or plain Axis2 handlers.

 

Mediators are very flexible and easy to develop and play well with other mediators currently in Synapse. If we use Axis2 handlers, configuring them on a per-service basis would involve going the ‘rampart-way’ – i.e. creating a Neethi assertion that would be embedded as part of the Policy associated with the service. (services.xml) . Are there any drawbacks in using Mediators (or Handlers) with respect to the other?

 

If you could share your opinions/thoughts on what is a technically better solution, I would really appreciate it. 

 

Thanks,

Murali

 


No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.20.9/1294 - Release Date: 2/22/2008 6:39 PM
 

Re: Mediators vs Handlers

Posted by Paul Fremantle <pz...@gmail.com>.
I want to offer some more observations:

1) Synapse mediators are more easily linked together using XML,
including if/else type behaviour. You can also create re-usable
sequences.
2) Synapse can be deployed both as a module (in-process with Axis2) as
well as a pure network appliance. (i.e. only network ports as the
interface)
3) Synapse offers more ways of creating mediation such as scripts,
XSLTs, XQueries as well as just Java
4) Synapse has more examples of side-effects (such as callouts, clone
and aggregate, etc), but these would probably be ok to implement with
Axis2

5) Axis2's module concept lets you interleave handlers in a smart way
using partial orderings that you can't do with Synapse
6) As you point out, the policy-driven model is a neat way of
configuring modules that is unique to Axis2.
7) If you are just doing Axis2 mediation, handlers are a simpler way
to go - less moving parts


Paul

2008/2/23 Gunasekaran, Murali <Mu...@softwareag.com>:
> Hello Asankha,
>  Thanks for your input. Yes, you are right - I think we need to analyze our use cases more to understand which would be a better fit.
>
>  Regards,
>  Murali
>
>
>
>  -----Original Message-----
>  From: Asankha C. Perera [mailto:asankha@wso2.com]
>  Sent: Saturday, February 23, 2008 10:43 AM
>  To: user@synapse.apache.org
>  Subject: Re: Mediators vs Handlers
>
>  Murali
>
>  I think if you are going to do things such as auditing, identification
>  etc, for many services and always expose these services via the ESB for
>  better management, versioning and policy enforcement etc. it would be
>  easier and better to do this with mediators instead of handlers. Then
>  you could easily configure the mediators with a common sequence, and
>  edit any parameters etc much easily than with a module.
>
>  However, if you wish to do these closer to the actual services (maybe
>  for security purposes?) etc, handlers would be better too. I think this
>  decision is made best by you, considering your environment and use cases
>
>  asankha
>
>  Gunasekaran, Murali wrote:
>  > Hello Group,
>  >
>  > We are currently debating using Synapse and are at crossroads over the implementation of certain things like auditing, consumer identification as mediators or plain Axis2 handlers.
>  >
>  >
>  >
>  > Mediators are very flexible and easy to develop and play well with other mediators currently in Synapse. If we use Axis2 handlers, configuring them on a per-service basis would involve going the 'rampart-way' – i.e. creating a Neethi assertion that would be embedded as part of the Policy associated with the service. (services.xml) . Are there any drawbacks in using Mediators (or Handlers) with respect to the other?
>  >
>  >
>  >
>  > If you could share your opinions/thoughts on what is a technically better solution, I would really appreciate it.
>  >
>  >
>  >
>  > Thanks,
>  >
>  > Murali
>  >
>  >
>  >
>  >
>  > No virus found in this outgoing message.
>  > Checked by AVG Free Edition.
>  > Version: 7.5.516 / Virus Database: 269.20.9/1294 - Release Date: 2/22/2008 6:39 PM
>  >
>  >
>  >
>
>  No virus found in this incoming message.
>
>
> Checked by AVG Free Edition.
>  Version: 7.5.516 / Virus Database: 269.20.9/1294 - Release Date: 2/22/2008 6:39 PM
>
>
>  No virus found in this outgoing message.
>  Checked by AVG Free Edition.
>  Version: 7.5.516 / Virus Database: 269.20.9/1294 - Release Date: 2/22/2008 6:39 PM
>
>



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

RE: Mediators vs Handlers

Posted by "Gunasekaran, Murali" <Mu...@softwareag.com>.
Hello Asankha,
Thanks for your input. Yes, you are right - I think we need to analyze our use cases more to understand which would be a better fit. 

Regards,
Murali

-----Original Message-----
From: Asankha C. Perera [mailto:asankha@wso2.com] 
Sent: Saturday, February 23, 2008 10:43 AM
To: user@synapse.apache.org
Subject: Re: Mediators vs Handlers

Murali

I think if you are going to do things such as auditing, identification 
etc, for many services and always expose these services via the ESB for 
better management, versioning and policy enforcement etc. it would be 
easier and better to do this with mediators instead of handlers. Then 
you could easily configure the mediators with a common sequence, and 
edit any parameters etc much easily than with a module.

However, if you wish to do these closer to the actual services (maybe 
for security purposes?) etc, handlers would be better too. I think this 
decision is made best by you, considering your environment and use cases

asankha

Gunasekaran, Murali wrote:
> Hello Group,
>
> We are currently debating using Synapse and are at crossroads over the implementation of certain things like auditing, consumer identification as mediators or plain Axis2 handlers.
>
>  
>
> Mediators are very flexible and easy to develop and play well with other mediators currently in Synapse. If we use Axis2 handlers, configuring them on a per-service basis would involve going the ‘rampart-way’ – i.e. creating a Neethi assertion that would be embedded as part of the Policy associated with the service. (services.xml) . Are there any drawbacks in using Mediators (or Handlers) with respect to the other?
>
>  
>
> If you could share your opinions/thoughts on what is a technically better solution, I would really appreciate it. 
>
>  
>
> Thanks,
>
> Murali
>
>  
>
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition. 
> Version: 7.5.516 / Virus Database: 269.20.9/1294 - Release Date: 2/22/2008 6:39 PM
>  
>
>   

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.20.9/1294 - Release Date: 2/22/2008 6:39 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.20.9/1294 - Release Date: 2/22/2008 6:39 PM
 

Re: Mediators vs Handlers

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

I think if you are going to do things such as auditing, identification 
etc, for many services and always expose these services via the ESB for 
better management, versioning and policy enforcement etc. it would be 
easier and better to do this with mediators instead of handlers. Then 
you could easily configure the mediators with a common sequence, and 
edit any parameters etc much easily than with a module.

However, if you wish to do these closer to the actual services (maybe 
for security purposes?) etc, handlers would be better too. I think this 
decision is made best by you, considering your environment and use cases

asankha

Gunasekaran, Murali wrote:
> Hello Group,
>
> We are currently debating using Synapse and are at crossroads over the implementation of certain things like auditing, consumer identification as mediators or plain Axis2 handlers.
>
>  
>
> Mediators are very flexible and easy to develop and play well with other mediators currently in Synapse. If we use Axis2 handlers, configuring them on a per-service basis would involve going the ‘rampart-way’ – i.e. creating a Neethi assertion that would be embedded as part of the Policy associated with the service. (services.xml) . Are there any drawbacks in using Mediators (or Handlers) with respect to the other?
>
>  
>
> If you could share your opinions/thoughts on what is a technically better solution, I would really appreciate it. 
>
>  
>
> Thanks,
>
> Murali
>
>  
>
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition. 
> Version: 7.5.516 / Virus Database: 269.20.9/1294 - Release Date: 2/22/2008 6:39 PM
>  
>
>