Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

69
Topic 2 Enterprise Service Bus Assoc.Prof.Dr. Thanachart Numnonda www.imcinstitute.com

description

Presentation Series on SOA : September 2010

Transcript of Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Page 1: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Topic 2

Enterprise Service Bus

Assoc.Prof.Dr. Thanachart Numnondawww.imcinstitute.com

Page 2: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

2

Agenda

What is ESB?

ESB Differences

What is JBI?

OpenESB &GlassFish

Usage Scenario

Page 3: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

3

What is ESB?

Page 4: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

SOA Framework Recap

External/Internal Systems

Build Re-usable Services (ESB) ‏

Business Process Management (BPEL) ‏

User Interface + Single Window (Portal)

User Interface Dashboard (KPI) ‏

Page 5: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

ESB

Enterprise Service Bus (ESB) is the software middleware

ESB acts as a mediator between different, often incompatible protocols and middleware products

ESB is the backbone of SOA

You can't buy SOA, but you can buy an ESB

Page 6: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

The role of ESB in SOA

Page 7: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

ESB Core Capabilities

Page 8: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Features of an ESB

• Web Services Support– ESB offers an ability to invoke SOAP and WSDL

based Web Services

• Adapters– Many ESB vendors will provide adapters to integrate

with different thrd-part applications, such as PeopleSoft, SAP

– Used for applications which do not directly have SOAP or XML interface

• Invocation– ESB supports synchronous and asynchronous calls to

services and sometimes callbacks

Page 9: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Features of an ESB (Cont.)

• Mediation and protocol independence– Variety of protocols can be reconciled for complex

route across a variety of platform– Allows to connect with different protocols such as

HTTP, FTP, SMTP, JDBC

• Routing– Allows us to route the messages to different services

based on their content, origin or other attributes

• Transformation– Data represented as XML can be transformed using

XSLT or XQuery before they are delivered to services.

– Some ESB supports various XML, e.g. HL7, SWIFT

Page 10: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Features of an ESB (Cont.)

• Orchestration– Offers the ability to coordinate multiple services to

expose them as a single proxy service– Many ESBs delegate this functionality to a BPEL

engine

• Security– Provides additional security capabiulity, SSL, SAML

• Control over the deployment, usage and maintenance of services

Page 11: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

ESB Features

Page 12: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Benefits of ESB

• Reduce time to integrate new and existing applicatioms

• Increase flexibility because system dependencies are reduced

• Simultaneous centralized management of services• Centralized management ability (e.g. BAM)• Encourage use of industry standard interface• Greater agility and responsiveness to change

Page 13: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

ESB Components

Page 14: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

ESB Components

• There is no single product that can effectively do all of the capabilities required of an ESB

• An ESB can be broken down into the following components

– Mediator– Service Registry– Choreographer– Rules Engine

Page 15: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Mediator

• Core capability of an ESB• Component responsibilities

– Routing– Communication– Message Transformation– Message Enhancement– Protocol Transformation– Message Processing– Error Handling– Service Orchestration– Transaction Management– Security

Page 16: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Service Registry

• Component responsibility– Service mapping

• Can be used for Policy based information• Very few products in the industry provide this

Page 17: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Choreographer

• Component responsibilities– Message Processing– Process Choreographer– Transaction management– Security

• Choreographer would be responsible for these capability only if it is the entrypoint into the ESB

Page 18: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Rules Engine

• Component responsibilities– Routing– Message Transformation– Message Enhancement

Page 19: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Mediator

Page 20: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Benefits of ESB

• Reduce time to integrate new and existing applicatioms

• Increase flexibility because system dependencies are reduced

• Simultaneous centralized management of services• Centralized management ability (e.g. BAM)• Encourage use of industry standard interface• Greater agility and responsiveness to change

Page 21: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

ESB Differences

Page 22: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Heterogeneous ESBs

Page 23: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

ESB Differences

• Point-to-Point Connection– consumer has to know the endpoint, it sends each request to

a specific receiver– The problem with this type of connection is that the call fails

if the physical receiver is not available.• Mediating Conenction

– identifies the provided service by a tag or symbolic that the ESB interprets to find an appropriate provider

– ESB plays the role of a mediator or broker

Page 24: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Point-to-Point Connection

Page 25: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Mediating Connection

Page 26: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Interceptor (based on Point-to-Point)

Page 27: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

ESB Differences

• Protocol Driven ESB– the ESB defines a protocol, and the providers and consumers

send and receive messages according to this protoco– Example; Web Services, which require a SOAP protocol,

• API Driven ESB– the ESB defines platform-specific APIs (such as Java

interfaces), and the providers and consumers use these APIs for service implementations and service calls (see Connecting to an API-driven ESB).

Page 28: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Protocol-Driven ESB

Page 29: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

API-Driven ESB

Page 30: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Commercial ESBs

• IBM WebSphere ESB • Sonic ESB• Oracle Service Bus• Software AG/WebMethods ESB• Microsoft Biztalk• TIBCO ActiveMatrix and BusinessWorks

Page 31: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Opensource ESB

• Mule• Apache ServiceMix• OpenESB (GlassFish v2)• Project Fuji (OpenESB v3)

Page 32: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

What is JBI?

Page 33: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Why JBI?

• Many ESB products in the market• Each has its own pattern and specification• Each may use different protocols and different

forms of communication• Need different ways / patterns of implementation• Need a ESB standard to avoid vendor lock-in• The ideas is this: someone implements the spec and

then they can in turn implement engine that are pluggable within that container.

Page 34: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

What is JBI?

• JBI (Java Business Integration) is a specification published by JCP (JSR 208)

• JBI is a message-based, pluggable meta-container• It is a container of containers.• JBI allows pluggable components to be added into

a standard architecture

Page 35: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

What Is JBI?

• Standard “meta-container” for integrated services

• Provides for plug-in:– Service Engines (SE):

business logic– Binding Components:

communications protocols

• Standard deployment / Management model

• Loose coupling via WSDL message exchanges between WSDL described Services

Page 36: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

JBI Architecture

Page 37: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

JBI Architecture

Page 38: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

JBI

Page 39: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Service Engines

• Sevice Engines (SEs) are JBI components that enable pluggable business logic

• SEs is a standard container for hosting WSDL-defined service providers as well as service consumers used internally by JBI

• Business Logic get deployed into SE• SE get installed into JBI runtime• OpenESB offers varous SEs

– BPEL SE– XSLT SE– JavaEE SE

Page 40: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Binding Components

• Binding Components (BCs) provides connectivity services to SE

• BCs offer protocol independence• BCs provide transport protocols for external

services• BCs converts a message that is bound to a specific

protocol or transport into the normalized protocols• Example BCs

– File, HTTP, FTP, SMTP, Database (JDBC)– CICS, DCOM, CORBA

Page 41: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Normalized Message Router

• NMR mediates the message exchange between Ses and Bcs within the framework

• NMR is the core of the bus• Allows services to interoperate by passing

messages between all the components• BC and SE are decoupled• NMR is bidirectional

Page 42: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

JBI and Composite Application

Page 43: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Overview of Message Routing

Page 44: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

JBI Runtime

Page 45: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

JBI Portability Model

• Components should be portable (SEs and BCs)• Service units are not portable across SEs/BCs from

different vendors• Example: moving an application from OpenESB

toServiceMix– Install all Open ESB Service Engines and Binding

Components that you used, in ServiceMix– Deploy the application into ServiceMix's runtime

Page 46: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

JBI Specification Example

Page 47: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

OpenESB & GlassFish

Page 48: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

What is Open ESB?

• Project Open ESB implements an Enterprise Service Bus (ESB) runtime using JBI as the foundation

– This allows easy integration of web services to create loosely coupled enterprise class composite applications.

• It also provides various tools for the development, deployment, and management of composite applications

Page 49: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

49

Open ESB Architecture

Page 50: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

IDE Web Server

BPELEditor

Java EESE JBI Bus

XSLTSE

HTTPBC

FTPBC

FTPBC

Many MoreSEs…

FTPBC

Many MoreBCs…

App Server

XSLTEditor

CompositeApplication

Project

IEP Editor

CompositeApplication

Manager

Runtime

BPELSE

Java EE

EJBs

Servlets

Java EESE JBI Bus

XSLTSE

HTTPBC

FTPBC

FTPBC

Many MoreSEs…

FTPBC

Many MoreBCs…

App Server

BPELSE

Java EE

EJBs

Servlets

Design-Time Management

3rd PartyService

Platforms

3rd PartyService

Platforms

Open Standard Based Service Bus

WS-Reliable MessagingWS-SecurityWS-FastInfoSet, …

Many MoreEditorsMany More

Editors

IEPMonitor

BPELMonitor

XSLTMonitor

Many MoreEditorsMany MoreMonitors

Page 51: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

JBI Support in GlassFish

• A JBI runtime has been integrated with GlassFish V2• GlassFish admin console now supports JBI• Java EE Service Engine act as the bridge between Java

EE applications and JBI• A Java EE application archive (ear/war/jar) can be

packaged in a JBI composite application• Expose JMX to tools• JBI runtime has been enhanced to adhere to the

appserver clustering architecture– Each instance in the appserver cluster will also have a JBI

runtime in it

Page 52: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

JBI in Admin Console

Page 53: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

OpenESB Web Site

• https://open-esb.dev.java.net/• Latest GlassFishESB v2.1 with NetBeans 6.1• Documents / Examples• 43 JBI Components

Page 54: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

JBI Components : Examples• Service Engines

– BPEL SE– XSLT SE– JavaEE SE– IEP SE– POJI SE– Scripting SE– WLM SE

Binding CompsMQSeries BCDatabase BCHL7 BCSAP BCSMTP BCHTTP BCJMS BCFile BCCICS BCDCOM BCCORBA BC...

• Nolonger Maintain– JavaScript SE– Aspect SE– JDBC BC– SMTP BC– SQL SE

Page 55: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus
Page 56: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Mule

Page 57: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

ServiceMix

Page 58: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

ESB Comparison

Page 59: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

59

Page 60: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

ESB (Forrester Wave; 2009)

Page 61: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Usage Scenario

Page 62: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Usage Scenario: Loan Processing• Loan Requestor Service:

– LoanRequestProcess• WS-I BP• BPEL Orchestration

– LoanProcessor• JavaEE

– TransformReport• XSLT

– LoanReportStore• Business Partner thru FTP

– LoanReportMailer• Legacy thru JMS

Page 63: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

NMR

BPEL XSLTJavaEE

WS-I BP JMS File

JBI-based

Infrastructure

Page 64: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

NMR

Loan

Request

Process

Transform

Report

Loan

Processor

EJB

LoanRS WS ReportMail ReportStore

BPEL XSLTJavaEE

FileJMSWS-I BP

JBI-based

Infrastructure

Page 65: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

NMR

Loan

Request

Process

Transform

Report

Loan

Processor

EJB

LoanRS WS ReportMail ReportStore

BPEL XSLTJavaEE

FileJMSWS-I BP

Page 66: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

NMR

Loan

Request

Service

Transform

Report

Loan

Processor

EJB

LoanRS WS ReportMail ReportStore

BPEL XSLT JavaEE

FileJMSWS-I BP

Architecture

Refactoring

Page 67: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

NMR

Loan

Request

Service

Transform

Report

Loan

Processor

LoanRS WS ReportMail

BPEL XSLT RulesEngine

ReportStoreFileJMSWS-I BP

LoanRS QJMS

ReportStore

JavaEE

Page 68: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

Resources

Some contents are borrowed from the presentation slides of Sang Shin, Java™ Technology Evangelist, Sun Microsystems, Inc.

Business Process Execution Language for Web Services, Matjaz B. Juric

The Role of the Enterprise Service Bus, Mark Richards Java SOA Cookbook, Eben Hewitt Building SOA-Based Composite Applications Using

NetBeans IDE 6, David Salter SOA in Practice, Nicolai M. Josuttis

Page 69: Service Oriented Architecture (SOA) [2/5] : Enterprise Service Bus

69

Thank you

[email protected]/imcinstitute

www.imcinstitute.com