Soa governance is a very broad topic. This blog focus on the SOA Usage governance and how can we implement Usage governance in open-esb and jbi. see Soa Governance
for sun soa governance solution.
When we talk about SOA Usage governance some of the questions that come up are:
- Are we using any usage metrics to for our services?
- Are we tracking the messages that are flowing through the system?
- Who has / can access a particular service (both internal and external)?
The common approach that the software vendors use is the interception or the mediation. The interception mechanism can be used for various purposes like filter, aggregation, content based routing, transformation, QOS and SLA
The strategies used to resolve Usage governance are
- Lease Management
- Charge back
- Access Control
- Message Tracking
- Prioritization ...etc
In JBI environment we can use either of the following strategy to mediate or intercept message.
a) NMR interceptor: The JBI spec ( possibly this feature will be included in JBI 2.0 ) provide the user with API to implement an interceptor/handler and use that to intercept message for a given JBI component.
b) Aspect Oriented Programming: In this approach the interception or mediation is done using a service engine called Aspect Service Engine.
The diagram above shows a request-response scenario. Both the request message and the response message is intercepted / mediated using a aspect service engine.
The idea is to inject one or more aspect in between a consumer and provider. The Aspect oriented approach is granular than the NMR interceptor approach and hence more powerful in certain cases. Here the user can be selective about applying aspect for specific service endpoint for a given JBI component. To know more about aspect oriented programming see
- Aspect Oriented Programming in JBI
- Aspect Service Engine
The diagram above shows the flow of message between Service Units of various service engine and Binding Components and the Aspect Service Unit.This basically shows how we can inject a set a aspect between a consumer and provider. Note each of this aspect for given SU are configurable during runtime.