Wednesday, December 18, 2019

12c SOA - Oracle Mediator part1 - Introduction

Introduction to Oracle Mediator:
  • Oracle Mediator provides a lightweight framework to mediate between various components within a composite application such as business processes, human workflows, and so on, using a Web Services Description Language (WSDL) document as the interface.
  • Oracle Mediator facilitates integration between events and services, where service invocations and events can be mixed and matched. You can use a Mediator component to consume a business event or to receive a service invocation. A Mediator component can evaluate routing rules, perform transformations, validate, and either invoke another service or raise another business event. You can use a Mediator component to handle returned responses, callbacks, faults, and timeouts.
  • Mediator follows V-E-T-R-O pattern.(where V=validation, E=Enrichment, T=Transformation, R=Routing and O=Operation).
This section provides an overview of Oracle Mediator features:
  • Content-Based and Header-Based Routing
  • Synchronous and Asynchronous Interactions
  • Sequential and Parallel Routing of Messages
  • Message re-sequencing
  • Data Transformations
  • Payload Validations
  • Java Callouts
  • Event Handling
  • Dynamic Routing
  • Error Handling
  • Multiple Part Message Support
  • Mediator Echo Support
Content-Based and Header-Based Routing
Mediator enables you to define rules based on the message payload or message
headers. You can select elements or attributes from the message payload or the
message header and, based on the values in those elements or attributes, you can
specify an action. For example, Mediator receives a file from an application or service
containing data about new customers. Based on the country mentioned in the
customer's address, you can route and deliver data to the database storing data for
that particular country. Similarly, you can route a message based on the message
header.

Synchronous and Asynchronous Interactions
Mediator supports both synchronous and asynchronous request and response
interactions. In a synchronous interaction, the client requests a service and then waits
for a response to the request. In an asynchronous interaction, the client invokes the
service, but does not wait for the response. You can specify a timeout period for an
asynchronous interaction and you can specify an action to perform after the timeout
period, such as to raise an event or start a process.
Mediator also supports event-based interactions. Events are one-way (fire-and-forget)
asynchronous interactions.

Sequential and Parallel Routing of Messages
Mediator lets you specify that a routing rule be executed either in parallel or in
sequence. You can configure the execution type from the Routing Rules section of the
Mediator Editor.
Click here 12c-soa-oracle-mediator-Sequential-vs-Parallel to know more details on sequential vs parallel routing rules.

Message Re-sequencing
When you use the Mediator resequencer, it rearranges streams of related but out-of sequence
messages into their sequential order based on the type of resequencer used
and the rules you define. When incoming messages arrive in a random order, the
resequencer orders the messages based on sequential or chronological information,
and then sends the messages to the target services in the correct order based on the
resequencing configuration.
Click here mediator-resequencer-implementation to know about Mediator resequencer implementation.

Data Transformation
Mediator lets you define data transformation from one XML schema to another. This
feature enables data interchange among applications using different schemas. For
example, you can transform a comma-delimited file to an XML schema that is
compatible with a database.

Payload Validation
You can configure Mediators to validate the incoming message payload using a
Schematron or an XSD file. You can specify Schematron files for each inbound
message part and Mediator executes Schematron file validations for those parts.
Click here for implementation details 12c-soa-oracle-mediator-schematron

Java Callout
Oracle Mediator provides support for Java callout. Java callouts enable the use of Java code, together with regular expressions.
Check for implementation 12c-soa-oracle-mediator-java-callout

Event Handling
An event is message data sent because of an occurrence of an activity in a business environment. Oracle Mediator provides support for subscribing to business events or raising business events. You can subscribe to a business event that is raised when a situation of interest occurs. For example, you can subscribe to an event that is raised when a new customer is created and then use this event to start a business process such as sending confirmation email. Similarly, you can raise business events when a situation of interest occurs. For example, raise a customer created event after completing the customer creation process.
click here 12c-soa-event-delivery-network-edn to know about Mediator and BPEL EDN implementation.

Dynamic Routing
Dynamic Routing separates the control logic, which determines the path taken by the process, from the execution of the process. You can create a dynamic routing rule from the Mediator Editor.
Click here for implementation 12c-soa-oracle-mediator-part6-dynamicrouting-Using-DVM

Error Handling
Oracle Mediator supports both fault policy-based and manual error handling. A fault policy consists of conditions and actions. Conditions specify the action to be carried out for a particular error condition.
Click here for implementation 12c-soa-oracle-mediator-part4-error-handling

Mediator Echo Support
Oracle Mediator supports echoing source messages back to the initial caller after any transforms, validations, assignments, or sequencing are performed.
Click here 12c-soa-oracle-mediator-part3-echo to know about Mediator Echo implementation.

Multiple Part Message Support
Mediator can process messages that consist of multiple parts. Some Remote Procedure
Call (RPC) web services contain multiple parts in the SOAP message.


Difference between Mediator and BPEL:
Mediator is particularly useful for content based routing of events, and as a listener for events. BPEL of course offers more possibilities for business logic and would generally be suited to defining process logic. A more complex SOA composite likely includes both components and others as well.

Mediator serves the purpose of a bus. It can be best utilized when used for routing. It can do routing based on many parameters and the best part is, the routing rules can be modified at runtime, thus giving the flexibility to choose the target at any point in time.
BPEL
1) Complex Logic
2) Good Support language in form of”activities”
3) Performance wise very slow
4) Support of Dehydration and Instance Monitoring
5) For Long Running process BPEL is the Right Solution
6) To implement the controlled Transactions
Integration of Rules Engine and Human Workflow
7) To implement the service virtualization BPEL is not the right approach

Mediator
1) Less Complex Logic
2) Less Support
3) Three times faster than BPEL
4) No support of dehydration
 5) For Long Running process not a proper solution
6) You cannot control the transactions in Mediator.
7) Mediator is the right approach for the service virtualization

Mediator vs. Oracle Service Bus (OSB)
Mediator
The “tiny”, “light weight” service bus
Limited to simple Mediator functionality for the implementation of the VETRO pattern
V alidade
E nrich
T ransform
R oute
O perate
Value Mapping and Cross-Reference Table for supporting the canonical datamodel
Development through JDeveloper IDE
Event Delivery Network for Publish-Subscribe semantic
Message Transformation with XSLT
Can be used and deployed as a SCA component
Oracle Service Bus (OSB)
The large, powerful service bus
Extended functionality important for enterprise-wide Integration, like
Message Throttling
Service Pooling
Reliable Messaging
Development through Eclipse IDE or Web Console(in 11g).
Message Transformation over XQuery and XSLT
OSB specific deployment
In 12c, its integrated with SCA.

No comments:

Post a Comment

Featured Post

OIC - Restrictions on Using Stage File Action Operations with the File/Attachment Features of the Connectivity Agent

Restrictions on Using Stage File Action Operations with the File/Attachment Features of the Connectivity Agent When configuring the stage fi...