soa

40
JBoss World 2009 | Burr Sutter ([email protected]) 1 Next Generation Open Source SOA Burr Sutter Sr. Product Manager, SOA (JBossESB, Riftsaw, jBPM, Drools) September 3, 2009

Upload: zubin67

Post on 12-May-2015

877 views

Category:

Documents


3 download

TRANSCRIPT

JBoss World 2009 | Burr Sutter ([email protected])1

Next Generation Open Source

SOA

Burr SutterSr. Product Manager, SOA(JBossESB, Riftsaw, jBPM, Drools)September 3, 2009

JBoss World 2009 | Burr Sutter ([email protected])2

Agenda

Is SOA Dead?

JBoss SOA Platform Overview & Roadmap

RESTful inclinations

Complex Event Processing (CEP) w/ Drools Fusion

Infinispan + ESB

BPEL

JBoss World 2009 | Burr Sutter ([email protected])3

Is SOA Dead?

"The report of my death was

an exaggeration."

Mark Twain

JBoss World 2009 | Burr Sutter ([email protected])4

SOA, ROA & WOA – Oh My!

ROA – Resource Oriented Architecture - REST (Representational State Transfer – Roy Fielding)

WOA – “Web Oriented Architecture (WOA) is a style of software architecture that extends service-oriented architecture (SOA) to web based applications, and is sometimes considered to be a light-weight version of SOA. WOA is also aimed at maximizing the browser and server interactions by use of technologies such as REST and POX.” - Wikipedia

SOA is NOT SOAP - architectural style vs wire protocol

SOA is NOT WS-*- patterns & principles vs a large body of standards

JBoss World 2009 | Burr Sutter ([email protected])5

SOAP vs REST Technical Differences

HTTP Verbs:SOAP – POSTREST – GET, PUT, POST, DELETE

Contract Definition:SOAP – WSDL – operations & messagesREST – HTTP Verbs are the operations, messages may or may not have a contract via XSD and/or JSON (POX – plain 'ol XML)

Content-Type:SOAP – focused on XMLREST – allows for any payload – XML, JSON, Atom, RSS, etc.

Clients:SOAP – requires a client that understands WSDLREST – requires a client that understand HTTP

JBoss World 2009 | Burr Sutter ([email protected])6

Forget Services, I want Events! - EDA

EDA – “Event Driven Architecture is a software architecture pattern promoting the production, detection, consumption of, and reaction to events. An event can be defined as a significant change in state” - Wikipedia

Services have historically been more request-response focused – synchronous processing – normally for responding to awaiting users/consumers.

Events are more real-time alerting, no waiting – asynchronous processing – think push.

“Event-driven architecture can complement service-oriented architecture (SOA) because services can be activated by triggers fired on incoming events” - Wikipedia.

JBoss World 2009 | Burr Sutter ([email protected])7

JBoss SOA Middleware

Overview

JBoss World 2009 | Burr Sutter ([email protected])8

ServiceRegistry Message

Store

Transformation Routing

Infrastructure Services

Security Management

DeclarativeOrchestration

Engine

jPDL

ProcessStore

EventNotificati

on

Pluggable Architecturefor integrating infrastructure mediation services

Web Services (Proxy)

EJB

POJOs

J2EE/Java EE 5

Business Servicesruns within a container or standalone

(S)FTP

File

JMS*

Email

SOAP

Excel

Browser

EJB

Native(SI)

ASCIIXML

Binary

Transports

Seam

SQL

Event Listeners and Actions provide transport mediation

Socket

Hibernate

JCA/Inflow BAM

Drools

Spring

Groovy

4.2 4.3 Future

BPELUDDI v3

DataSourcesMetaMatrix

HTTP S

S

Improvements in 5.x

InVM

Jython

Beanshell

SeamJCA

Service Component Architecture

Service Data Object

JRuby

Business

Data

ESB

CEP

DSL

Decision Table

JMS* - JBoss Messaging, IBM WebsphereMQ, TIBCO EMS, MRG-M

5.0

JBoss World 2009 | Burr Sutter ([email protected])9

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

Beyond ESB: Context

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

Send Shipment

JBoss World 2009 | Burr Sutter ([email protected])10

Synergy of ESB + BPM + Rules

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, Message Formats, Routing Logic, Business Rules, Scripting Languages

JBoss World 2009 | Burr Sutter ([email protected])11

SOA Monitoring and Management

JBoss World 2009 | Burr Sutter ([email protected])12

REST

JBoss World 2009 | Burr Sutter ([email protected])13

Value of REST with an ESB

JBossESB is not hard-wired into Web Services nor JMS, it is async event-driven and also allows for sync request-response.

RESTful style interactions (GET, PUT, POST, DELETE) allow for Groovy, JavaScript, Ruby, etc clients to more easily consume a service.

JBossESB now allows for different content types and use of HTTP response codes.

REST is based on HTTP – new http-provider (ESB 4.7)

JBoss World 2009 | Burr Sutter ([email protected])14

New HTTP Provider (jboss-esb.xml) <providers>

<http-provider name="http"> <http-bus busid="http_gateway"/> <exception

mappingsFile="/http-exception-mappings.properties" /> </http-provider> </providers>

<services> <service category="Sales" name="List"

description="" invmScope="GLOBAL"> <listeners> <http-gateway name="sales"

busidref="http_gateway"urlPattern="sales/*" />

</listeners> <actions mep="RequestResponse"> <action name="createAtomFeed"

class="atom_publisher.MyAction"/> </actions> </service> </services>

http://localhost:8080/MyESBArchive/http/sales/*

JBoss World 2009 | Burr Sutter ([email protected])15

ESB Transport Mediation

JMS

Action

JMS

Action

DB

SLSB

POJO

Logic_Service

InVM

WS

HTTP

Intake_Service

Clients

Java

.NET

JavaScript *

Use a network-basedprotocol between JVMs

Service to Serviceinvocation in the same

JVM

JBoss World 2009 | Burr Sutter ([email protected])16

ATOM Demo

JBoss World 2009 | Burr Sutter ([email protected])17

Complex Event Processing

JBoss World 2009 | Burr Sutter ([email protected])18

ESP + CEP via ESB, Rules & JON

Many Streams Or Flows

ESB: consumption, capture, transformation, routing, orchestrationRules: selection, aggregation, correlation, generation and publication

Repository: for editing, versioning, testing and publishing new rules and SOA artifacts

GovernanceTools

JON: start/stop services, monitor and alert on serviceand action-level performance, monitor and alert onbusiness metric values

JBoss World 2009 | Burr Sutter ([email protected])19

Event Declaration & Selection

declare StockTick @role( event ) @expires( 2m )end

rule "average over last minute"when $stat : Statistics( $symbol : symbol ) Number( $av : doubleValue ) from accumulate( StockTick( symbol == $symbol, $p : price )

over window:time( 1m ) from entry-point "StockTick stream", average( $p ) )then modify( $stat ) { average = $av } end

JBoss World 2009 | Burr Sutter ([email protected])20

DataOf Interest

Deal flow – Business Interceptor

Submit Order

Receive Order Validate Order

Credit Check

Inventory Check

Handle Shipment

Send Shipment

CSR Teams

Issues

Alternate Supplier

Replenishment

Supplier Manufacturing

Parts AvailableProduct

Available

SchedulePO

Receiving

Urgent

Cross Dock

InventoryManufacturing

Warehouse

Accounting

Market Monitor

Significant

Manager

Inventory Schedule

Replenishment Manufacturing

JBoss World 2009 | Burr Sutter ([email protected])21

Value of CEP – Drools Fusion

Stateful Rules Engines live in ESB Nodes, they retain the real-time history of the event flow

Rules look for significant/interesting events in the stream, expiring older, insignificant events (memory management) – stateless rules engines/ESB nodes can route to stateful engines.

Event data can be aggregated/accumulated over a time window or event series

New events or messages back through the ESB can be generated, providing an alerting mechanism.

JBoss World 2009 | Burr Sutter ([email protected])22

CEP via JBossESB

JMS

RulesAction

WS

HTTP

Intake_Service

Clients

Java

.NET

JavaScript

BPMAction

JMS

Normal_Processing_Service

RulesAction

JMS

CEP_Stateful_Service

JVM1 JVM2

JVM3

In-Memory Event

IdentificationSelection

Raw Events

BusinessProcessEvents

StreamCorrelationAggregation

BPMAction

JMS

Alert _Processing_Service

JVM4

JBoss World 2009 | Burr Sutter ([email protected])23

CEP Demo

JBoss World 2009 | Burr Sutter ([email protected])24

Infinispan + ESB

JBoss World 2009 | Burr Sutter ([email protected])25

Quick Introduction: Infinispan

Spiritual successor to JBoss Cache > Data Grid

Still a “peer to peer” architecture, client-server is also available

JSR 107 – JCACHE

Speaks REST, memcached and a custom binary protocol

Improve response times for service requests

Reduce load on critical backend systems

Improve fault tolerance, throughput, performance

Linear scalability

Predictable latency under increasing load

Access to more than a single JVM's Heap

JBoss World 2009 | Burr Sutter ([email protected])26

Service Result Cache

DB

<XML>

</XML>

CICSData Grid

ESBand/orBPEL

Client

request

response

service 1

service 2

service 3POJOs

Results of service invocations to “expensive” resourcescan be cached by the middle-tier architecture.

Transformations to POJOs can be time consuming

JBoss World 2009 | Burr Sutter ([email protected])27

Hoppity, Hop, Hop

IntakeService

StoreService

ProcessService

<XML>

</XML>

DB

ORMValidationScoringRules

jBPM

Serializing large XML, transforming multiple times,serializing large POJOs across multiple network/JVM boundaries

can be expensive

DroolsHibernate

JVM1 JVM2 JVM3

JBoss World 2009 | Burr Sutter ([email protected])28

Still Hopping, less load

IntakeService

StoreService

ProcessService

<XML>

</XML>

DB

ORMValidationScoringRules

Keep the transformed version, send the key to

the cache claim check pattern

jBPM

JBoss World 2009 | Burr Sutter ([email protected])29

Data Grid Demo

JBoss World 2009 | Burr Sutter ([email protected])30

BPEL

JBoss World 2009 | Burr Sutter ([email protected])31

Simple BPEL Process Structure

Receive

Assign

Reply

Invoke

Assign

MyProcess.bpel

Import

Partnerlinks

Variables

ExternalService

AnyWeb ServiceConsumer

Sequence

/Sequence

WSDLThe contract/interfaceof the PartnerLinkof the CONSUMED service

WSDLThe contract/interface

of the PartnerLinkof the EXPOSED service

JBoss World 2009 | Burr Sutter ([email protected])32

Tools – BPEL Editor

JBoss World 2009 | Burr Sutter ([email protected])33

BPEL Palette

JBoss World 2009 | Burr Sutter ([email protected])34

Partner Link Properties

JBoss World 2009 | Burr Sutter ([email protected])35

Tools – WSDL Editor

JBoss World 2009 | Burr Sutter ([email protected])36

BPEL Resources

http://www.jboss.org/riftsawRiftsaw ForumsWS-BPEL Primer:http://docs.oasis-open.org/wsbpel/2.0/Primer/wsbpel-v2.0-Primer.html

WS-BPEL 2.0 Specification:http://docs.oasis-open.org/wsbpel/2.0/OS/wsbpel-v2.0-OS.html

Apache Odehttp://ode.apache.org/

JBoss World 2009 | Burr Sutter ([email protected])37

JBoss World 2009 | Burr Sutter ([email protected])38

Professional Enterprise Support

RESTful HTTP – SOA Platform 5 (Q1 2010)

CEP – SOA Platform 5 (Technology Preview)

Infinispan – SOA Platform 5.1 or 6.0 (TBD)

BPEL – BPEL Platform 2.0 (Q1 2010)

ESB – Kevin Conner (Newcastle)

CEP via Drools Fusion – Edson Tirelli (Toronto)

Infinispan – Manik Surtani (London)

BPEL via Riftsaw – John Graham (Boston)

For more information at JBoss World 2009

JBoss World 2009 | Burr Sutter ([email protected])39

JBoss World 2009 | Burr Sutter ([email protected])40