JBoss SOA Platform 4.2 – Deep Dive Burr Sutter February 2008

Preview:

Citation preview

JBoss SOA Platform 4.2 – Deep DiveBurr Sutter

February 2008

Questions: burr.sutter@jboss.com

EJB

WS

HibernateJPA

JMS

JCA

Servlet

JSP

SOAP/WSDL

RMIBPM

Rules

App Server vs ESB for SOA

EJB

WS

HibernateJPA

JMS

JCA

Servlet

JSP

SOAP/WSDL

RMI

Application ServerBusiness Service Enablement Platform

Questions: burr.sutter@jboss.com

App Server vs ESB for SOA

Load Balancer

Service ClusteringStateful Fault Tolerance/Smart Load Balancing

Questions: burr.sutter@jboss.com

Registry& Messaging

App Server vs ESB for SOA

Accounting

CRM

Billing

Inventory

Routing/Orchestration

Questions: burr.sutter@jboss.com

Registry& Messaging

App Server vs ESB for SOA

Java

.NET

LAMP

Legacy

FIREWALL

Partners

Transformation

Routing/Orchestration

FTPFileTCP

SOAP

RESTJMS

Questions: burr.sutter@jboss.com

Registry& Messaging

App Server vs ESB for SOA

Java

.NET

LAMP

Legacy

FIREWALL

Partners

Transformation

Routing/Orchestration

FTPFileTCP

SOAP

RESTJMS

ESB

Note: an ESB still runs in a JVMoften that is an App Server

Questions: burr.sutter@jboss.com

An Integration Challenge

BrowserB2E

Admin

DB

HQ(consumer &

producer)

MQ VPN

Master Data

WebService CC Auth

Reporting Engine

AccountingPackage(consumer)

ASCII

ASCIIInternetFTPB2B

Partner(consumer)

Scheduled Service

POS(consumer)

WebService

BrowserB2C

eCommerce

Internet

Questions: burr.sutter@jboss.com

SOA Platform 4.2

Declarative Transformation includes:Message Normalization,Validation, Enrichment,

Via XSLT, Groovy, Java, StringTemplate, FreeMarker

ServiceRegistry

UDDI

ESB

MessageStore

Transformation Routing

Infrastructure Services

Security Management

DeclarativeOrchestration

Engine

BPELjPDL

ProcessStore

EventNotification

Pluggable Architecturefor integrating infrastructure services

Web Services

EJB

POJOs

Java EE 5

Business ServiceComponents

BusinessData

JCA

RDBMSLegacyCOTS

Business Servicesrun within a container or standalone

Service Data Object

Service Component Architecture

HTTP(S)

(S)FTP

File

JMS

Email

SOAPExcel

Browser

Java

Native

ASCIIXML

Binary

Transports

Web

SQL

Event Listeners and Gateways provide transport mediation

Socket

Hibernate

JCA/Inflow

CustomAction

Seam

Drools

Spring

Groovy

Questions: burr.sutter@jboss.com

SOA Platform 4.2

ServiceRegistry

UDDI

ESB

MessageStore

Transformation Routing

Infrastructure Services

Security Management

DeclarativeOrchestration

Engine

BPELjPDL

ProcessStore

EventNotification

Pluggable Architecturefor integrating infrastructure services

Web Services

EJB

POJOs

Java EE 5

Business ServiceComponents

BusinessData

JCA

RDBMSLegacyCOTS

Business Servicesruns within a container or standalone

Service Data Object

Service Component Architecture

HTTP(S)

FTP

File

JMS

Email

SOAPExcel

Browser

Java

Native

ASCIIXML

Binary

Transports

Web

SQL

Event Listeners and Actions provide transport mediation

Socket

Hibernate

JCA/Inflow

CustomAction

Seam

Drools

Spring

Groovy

Now Future Partners

BPELUDDI v3

S

S

Questions: burr.sutter@jboss.com

ESB++ Scenario

HTTP

FTP

File

JMS

Email

SOAP

SQL

Custom

HTTP

FTP

File

JMS

Email

SOAP

SQL

Custom

jBPM

Rules

EJB WS

HibernateJPA

J2EE/Java EE 5 Services

JMS JCA

Questions: burr.sutter@jboss.com

Service Federation

Registry& Messaging

Transformation Services Cluster

Rules Services Cluster

Order Validation

Credit Check

Process Store

Customer Inquiry

Customer Update

Accounting

Order Services

Routing Services

Customer Services

* JVM

Order Validation

Credit Check

Shipping Calc

Inventory Check

Inventory Update

Warehouse Services

Shipping Calc

Inventory Check

Inventory Update

Shipping Calc

Inventory Check

Inventory Update

Customer Inquiry

Customer Update

Accounting

Questions: burr.sutter@jboss.com

ESB Definition

• There is NO J2EE-like specification with a TCK that can define and validate an ESB like there is for App Servers.

• ESBs are categorized by their capabilities – some come from a heritage of EAI and others of MOM.

• Capabilities:– Message delivery– Transport protocol mediation– Event capture– Intelligent routing– Orchestration– Transformation– BPM– Adapters– And much, much more…

Questions: burr.sutter@jboss.com

JBossESB 4.2 provides

• Message delivery– JMS (JBossMQ, JBoss Messaging, ActiveMQ, MQSeries, Oracle AQ, TIBCO EMS)– FTP, SOAP, email, database, shared file system

• Action chaining/pipeline – For custom service enablement & mediation

• Transformation– XSLT, Java, Groovy, StringTemplate, Freemarker

• Content-based routing– JBoss Rules, XPath DSL– Recipient List/Static Routing is also supported

• Orchestration – BPM, Intelligent routing, EIPs and hot deployment

• Registry– JAX-R based– UDDI support out-of-the-box

• Message Store• Gateways• Extensive examples and documentation• And more…

Questions: burr.sutter@jboss.com

JBoss ESB 4.2

• JMX Microkernel

• Federated Clustering

• WS-*– SOAP

– WSDL

– JAX-WS Annotated POJO Endpoints

– EJB Endpoints

– JAXB 2.0

• BPEL 2.0

• New Deployment Architecture

• .esb Archive

• Hot Deployable Core Services

• Content Based Filter

• Business Rules Services

• Native Process Orchestration

• Hibernate Gateway/Listener

• HTTP Gateway/Listener

• Groovy Scripting

• Declarative Message Store

• JCA Container

• Spring Action AOP & POJO

• Monitoring & Mgmt Tools

• Additional EIP examples

Questions: burr.sutter@jboss.com

Action Pipeline (in a Service)

FTP Action Action Action ActionBusiness

LogicComponent

TransformationCSV to XML

TransformationXML to POJO

RoutingSplitter

orBPM

LoggingAuditTrail

My_Registered_Service

Business Logic:• POJO• EJB • WS• Rules• JCA with Adapters• Anything with Java API

Actions are reusable mediation components that can be chained together to form the capabilities of a registered service. Actions can be dynamically added/removed at runtime.

Action

BusinessLogic

Invocation

This box can also represent the ESB’s JVM – actions are “in VM”

Questions: burr.sutter@jboss.com

Out of the Box Actions

• AbstractSpringAction• Aggregator• BeanConfiguredAction• BpmProcessor• BusinessRulesProcessor• ByteArrayToString• ContentBasedRouter• ContentBasedWiretap• GroovyActionProcessor• HttpRouter• JMSRouter• LongToDateConverter• MessageFilter

Refer to the MessageActionGuide.pdf

• MessagePersister• Notifier• ObjectToCSVString• ObjectToXStream• SmooksTransformer• SOAPProcessor• SOAPClient• StaticRouter• StaticWiretap• SystemPrintln• XStreamToObject

Basic Service Demo

Questions: burr.sutter@jboss.com

Content Based Routing

SOAP Action

DBPOJO

Platinum_Service

FTP

ASCIIXML

Binary

Action

Ordering_Service

Randomly grab orders for review – tracer andKeep a total of all orders flowing through the system

SOAP Action

Special_Handling

EJB

Orders over 12K or from Platinum customers

DB

Orders from customers in certain states/countries

Questions: burr.sutter@jboss.com

Content Based Routing Engine

• Currently based on JBoss Rules – supports XPATH DSL

• Access to the complete Header and Body/Contents for evaluation

• Zero to many destinations

rule "Routing Rule using XPATH Greater" when xpathGreaterThan "/Order/@totalAmount", "50.0" then Log : "Really It's EXPRESS Shipping"; Destination : “express";end

rule "Routing Rule using XPATH Less" when xpathLessThan "/Order/@totalAmount", "50.0" then Log : "Really It's NORMAL Shipping"; Destination : “normal";end

Destination is determined by the jboss-esb.xml

Questions: burr.sutter@jboss.com

Load Balancing & Fail-Over

The same discount_service.esb can be deployed to multiple ESB instances/nodes. Each one is a new EPRs in the registry. The routing engine is clever enough to load-balance and fail-over between the various EPRs. Should no EPR be available, it will scheduled the message for redelivery, waiting N seconds and retrying all possible EPRs found at that time.

Load-Balancing Demo

Questions: burr.sutter@jboss.com

Deployment Options

• 1) ESB “within” an Application Server – Users have existing investments in the J2EE/Java EE App Servers and wish to run the ESB as a set of components in that App Server.

– JBoss ESB can run “within” the JBoss Enterprise Application Platform 4.2

• 2) ESB “beside” an Application Server – Users wish to leave their existing application server environments untouched but still add mediation, SOA & integration capabilities.

– JBoss ESB has its own lightweight engine/container for the hosting mediation services. It can run “beside” your existing middleware from your vendor of choice.

• 3) ESB “standalone” in a J2SE environment – this option is primarily for development & testing purposes

Questions: burr.sutter@jboss.com

Management & Monitoring

• 4.2 Release is focused on JMX instrumentation, the ability to monitor the health and load of every distributed service as well as start, stop & restart them remotely.

Questions: burr.sutter@jboss.com

Management & Monitoring Architecture

Mgmt & Monitoring Demo

Orchestration

Questions: burr.sutter@jboss.com

Service Oriented Orchestration

Customer

CustomerService

Warehouse

Shipper

Submit Order

Receive Order Validate Order

Credit Check

Inventory Check

Handle Shipment

Send Shipment

CreditAgency

CSR Teams

Issues

a Parse XMLb Transformc Apply Business Rules

Validate Order

a Create Outbound Msgb Handle Responsec Apply Business Rules

Credit Check

a Send to N Warehousesb Handle N Responsesc Determine Best WHSEsd Handle Drop-Ships

Inventory Check

ESB Mediates& Provides Services

a Determine Shipper(s)b Print Labelsc Print Pick Ticketsd Create & Send ASNs

Send Shipment

Questions: burr.sutter@jboss.com

Service Orchestration & BPM

Submit Order

Receive Order Validate Order

Credit Check

Inventory Check

Handle Shipment

Send Shipment

CSR Teams

Issues

Customer CSR Sales Mgmt WHSE MgmtHumans

J2EE AppServer

FTP

SOAP

File

ValidateOrder

CreditCheck

InventoryCheck

SendShipment

External Credit/Bank Legacy Partners

Various Transports

An ESB Service is visible in the UDDI registry automatically. A single ESB Service may or may not expose a WSDL. It may use out-of-the-box actions, custom actions and/or consume external services from various sources. Focus on the reuse of existing infrastructure and assets.

Questions: burr.sutter@jboss.com

Orchestration Designer

Orchestration Demo

Questions: burr.sutter@jboss.com

BPEL

• We are partnering with Active Endpoints• www.activebpel.org• Download their open source BPEL engine and

contact them for their free design tool.• As for ESB 4.2, review the webservice_bpel

quickstart, specifically the ActiveBPEL-Orchestration.odp under that quickstart’s Docs folder.

• And engage us in the online forums: http://www.jboss.com/index.html?module=bb&op=viewforum&f=246

Questions: burr.sutter@jboss.com

Active Endpoints Designer

Questions: burr.sutter@jboss.com

Active Endpoints Console

Questions: burr.sutter@jboss.com

Possible Big Picture

DB

WSClient

Application Server

Enterprise Service Bus

Action

Service D

Action

Service C

Action

Service A

JVM

Spring

DAO

EJB

Rules

Groovy

Action

Service B

ORCHESTRATION

SOAP

BPEL

PartnerLink

PartnerLink

PartnerLink

SOAP

JMS

FTP

SERVICE

LegacyApplication

SOAP

.NETApplication

SOAP

Note: Not every technology is required. This is simply a way to illustrate howthe various technologies might be usedtogether

Questions?

Questions: burr.sutter@jboss.com

Where’s the Logic?

• As a scriptlet in your JSP• Behind your Swing Button Click Action Handler• In your Struts Action• In your DAOs• In your Stored Procedures

Questions: burr.sutter@jboss.com

The Modern Silo

DB

App

Web Pages: Struts, JSF, Tapestry

DAO/JPA/SLSB/Spring BeanHibernate

Query/Stored Procedure

Browser

Questions: burr.sutter@jboss.com

Silos Across the EnterpriseClient

Client Client

Client

CRMOrdering

Accounting Manufacturing

Warehouse

Questions: burr.sutter@jboss.com

Integrating Silos (Dump & Load)Client

Client Client

Client

CRMOrdering

Accounting Manufacturing

Warehouse

PHP

MySQL

Web5250

RPG

DB/2 400

VisualBasic

Stored Proc

SQL Server

Struts

DAO

Oracle

DUMPASCII

SOAP

FTP

ASCII

ASCII

VisualBasic

ASCII

FTP

FTP

Questions: burr.sutter@jboss.com

Intermediate those Silos

DB

App DAO/JPA/SLSB/Spring BeanHibernate

Query/Stored Procedure

Service 1 Service 2 Service 3

Browser Rich B2B Legacy

Mediation

Service 4 Service 5 Service 6Mediation

Questions: burr.sutter@jboss.com

Splice Technique

Web Order Entry

Oracle

Web

JSF

HibernateEJB3

Seam

Web Order Entry 2

DB/2

Web

Struts

HibernateiBatis

SpringInterceptors

Callback Listeners

AOP

JBoss ESB

queuequeue

queuequeue

Recommended