JBoss ESB, jBPM, Drools Deep Dive - thedevconf.com · Drools Spring Groovy. ESB++ Scenario HTTP FTP...

Preview:

Citation preview

JBoss ESB, jBPM, DroolsDeep Dive

Burr Sutter

July 2008

EJB

JMSServlet

JSP

RMI

BPM

App Server vs ESB for SOA

EJB

JMSServlet

JSP

RMI

Questions: burr.sutter@jboss.com

WS

Hibernate

JPA

JCA

SOAP/WSDL

Rules

WS

Hibernate

JPA

JCA

SOAP/WSDL

Application Server

Business Service Enablement Platform

App Server vs ESB for SOA

Load Balancer

Questions: burr.sutter@jboss.com

Load Balancer

Service Clustering

Stateful Fault Tolerance/Smart Load Balancing

App Server vs ESB for SOA

Questions: burr.sutter@jboss.com

Registry

& Messaging

Accounting

CRM

Billing

Inventory

Routing/Orchestration

App Server vs ESB for SOA

Java LAMP F

I

Transformation

Questions: burr.sutter@jboss.com

Registry

& Messaging

.NET Legacy

I

R

E

W

A

L

LPartners

Routing/Orchestration

FTP

File

TCPSOAP

REST

JMS

App Server vs ESB for SOA

Java LAMPF

I

Transformation

ESB

Questions: burr.sutter@jboss.com

Registry

& Messaging

.NET Legacy

I

R

E

W

A

L

LPartners

Routing/Orchestration

FTP

File

TCPSOAP

REST

JMS

Note: an ESB still runs in a JVM

often that is an App Server

SOA Platform 4.2

ESB

Transformation Routing

Infrastructure

Services

Security Management

Pluggable Architecturefor integrating infrastructure services

Web Services

EJB

Java EE 5

Business Service

Components

JCA

Business Servicesrun within a container or standalone

HTTP(S)

(S)FTP

File

JMS

Email

ASCII

XML

Binary

Transports

Event Listeners and Gateways provide transport mediation

Seam

Questions: burr.sutter@jboss.com

Declarative Transformation includes:

Message Normalization,

Validation, Enrichment,

Via XSLT, Groovy, Java, StringTemplate, FreeMarker

Service

Registry

UDDI

ESB

Message

Store

Declarative

Orchestration

Engine

BPEL

jPDL

Process

Store

Event

Notification

POJOs

Business

Data

RDBMS

Legacy

COTS

Service Data Object

Service Component Architecture

SOAPExcel

Browser

Java

Native

Web

SQL

Socket

Hibernate

JCA/Inflow

Custom

Action

Drools

Spring

Groovy

ESB++ Scenario

HTTP

FTP

File

JMS

HTTP

FTP

File

JMS

jBPM

Questions: burr.sutter@jboss.com

Email

SOAP

SQL

Custom

Email

SOAP

SQL

Custom

Rules

EJB WS

Hibernate

JPA

J2EE/Java EE 5 Services

JMS JCA

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

Questions: burr.sutter@jboss.com

– Transport protocol mediation

– Event capture

– Intelligent routing

– Orchestration

– Transformation

– BPM

– Adapters

– And much, much more.

Action Pipeline (in a Service)

FTP Action Action Action Action

Business

Logic

Component

My_Registered_Service

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

Questions: burr.sutter@jboss.com

Component

Transformation

CSV to XML

Transformation

XML to POJO

Routing

Splitter

or

BPM

Logging

Audit

Trail

Business Logic:

• POJO

• EJB

• WS

• Rules

• JCA with Adapters

• Anything with Java API

Business

Logic

Invocation

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

Demo

Services & Actions

SOAP Action DBEJB

B_Service

A_Service

Questions: burr.sutter@jboss.com

FTPASCII

XML

Binary

Action Action

JMS Action

DBPOJO

C_Service

JMS Action DBWS

D_Service

Content Based Routing

File Action

DBPOJO

Platinum_Service

FTP Action

Ordering_Service

Orders over 12K or from Platinum customers

JMS

Questions: burr.sutter@jboss.com

Randomly grab orders for review – tracer and

Keep a total of all orders flowing through the system

JMS Action

Special_Handling

EJB

DB

Orders from customers in certain states/countries

SOAP

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

Questions: burr.sutter@jboss.com

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

Load Balancing & Fail-Over

Questions: burr.sutter@jboss.com

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.

Demo

Today 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

Governance & Rule Services

Action

Groovy -

Discover

Message

OriginAction

Rule

Service:

Discount

Rule

Service

Content

FTP

Order

SOAP

JMS

Questions: burr.sutter@jboss.com

Smooks

XML2POJ

O

Action

Rule

Service:

Priority

Discount Content

Based

Router

Rule

Repository

RuleAgent Cache

Categorization/Classification, Editing, Validation & Testing

Versioning, Audit – for Policy Managers & Business

Analysts

ESP + CEP via ESB, Drools & JON

Multiple Streams

Or Flows

ESB: consumption/capture, transformation, orchestration

Drools: selection, aggregation, correlation, generation and publication

Questions: burr.sutter@jboss.com

BRMS: for editing, versioning, testing

and publishing new rules

Governance

Tools

JON: start, stop services, monitor and alert on service

and action-level performance, monitor and alert on

Business metric values

Orchestration

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

FTP

SOAP

File

Questions: burr.sutter@jboss.com

J2EE App

Server

FValidate

Order

Credit

Check

Inventory

Check

Send

Shipment

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.

Orchestration Designer

Questions: burr.sutter@jboss.com

Demo

Questions

Summary

• Orchestration engine for both declarative service flow

and human-task management

• RETE-based rules engine for Content Based Routing,

Event Filtering and event-based data manipulation in

the form of Business Rules Services

• Built-in clustering JMS 1.1 certified broker

• Built-in fragment-based transformation solution

Questions: burr.sutter@jboss.com

• Built-in fragment-based transformation solution

• Built-in UDDI-based registry (with auto-registration)

• Built-in JAX-WS certified web service stack

• Based on the JMX-Microkernel - plug & play of services

• Federated monitoring/management architecture

• Service-level Load Balancing & Fail-Over

Recommended