69
A Guide to the SOA Galaxy: Strategy, Design and Best Practices Dmitri Shiryaev Java Tools Sun Microsystems, Inc.

A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Dmitri ShiryaevJava Tools

Sun Microsystems, Inc.

Page 2: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Guide to the SOA Galaxy

You are here

4. ESB2. BPEL

3. JBI

5. Java CAPS1. Intro

6. . The Answer To Everything

Page 3: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Business-IT Context for SOA• Creating an IT environment to support

continuous business optimization• Structures your IT applications in line with

your business processes– Speeds business change– Facilitates business connections– Enchances business control

• Heavy focus on flexible interconnections with carefully managed qualities of service (QoS)

Page 4: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Why SOA?Channels

Provisioning

SuppliersInternal UsersCustomersPartners

InventoryBillingCRMLegacy

Information Assets

$ $$

$$

$

$$

$$

$$

$

$

$ $$

• Inflexibility of IT Infrastructure

• Complexity of Integration Projects

• Integration Costs• Time to Market• Limited Partnering

Flexibility• Limitations of EDI

Page 5: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

SOA and Web Services• Web services are most people's first and only

exposure to SOA• Only one manner of service access

– Message-oriented middleware (MOM)– CORBA, RMI, DCOM, raw sockets, Email etc.

• SOA architectures tend to be best implemented using web services as the middleware technology

Page 6: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Why Services?• SOA = an architectural principle for

structuring systems• SOA emphasizes the de-coupling of system

components• New services are created from existing

ones in a synergistic fashion• Strong service definitions are critical• Services can be subsequently re-composed

in response to changing business requirements

Page 7: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

What Are Services?

• A function accessed using XML message exchange

• Message exchanges have well known exchange patterns

• Services are self-describing, using metadata (WSDL)

Page 8: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

What Does a Service Do?

• Transform data• Route messages• Query databases• Orchestrate conversations• Apply business logic• Apply business policy• Handle business exceptions• Solicit approvals• …

Page 9: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

How Is a Service Implemented?• XSLT • Enterprise JavaBeans™ (EJB™) technology• BPEL• SQL• XQuery• Routing table• Business rules• EDI transform• …

Page 10: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Benefits of SOA• Flexible (Agile) IT

– Adaptable to changing business needs • Faster time to market

– Reuse existing code, minimize new development

• Business and process-driven– New business opportunities

• Greater ROI – Leverage existing IT asset

Page 11: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

SOA Layers

Process Layer

Service Layer

Resource Layer

Access Layer

Page 12: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

The “Move” to SOANon-Integrated

Integratedand Shared

Page 13: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

The Shift

• SOA is a combined effort between IT and the business units

SOA

IT Biz Units

Process Layer DefinerService Layer

Provider

Page 14: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Pre-SOA Scenario

CustomerData

CustomerData

BalanceCheck

CreditCheck

FraudDetection

Partner Credit Data

Partner Credit Data

BalanceCheck

CreditCheck

InterestCalc

Credit Card

Mortgage

Back-End System

Back-End System

Page 15: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

SOA-Enabled Scenario

Reusable Services

Credit Card Mortgage

Partner Credit Data

Customer Data Service

AccessService

Credit Check

Fraud Detection

Customer Data

PaymentManagement

Service

TradeExecutionService

Internet

Bill PayAuto

Loans StocksMutualFunds

IncreasedAgility

Interest Calc

Balance Check

Back-End System

Back-End System

Page 16: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

SOA Architectural Big Rules Document-based Mostly Async Conversational

Reliable Secure/Identity Policy Driven

BPEL OrchestratedWSDL Described

Registered and Retrieved

JBI-based

Coarse Grained Business Services

Page 17: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

SOA Architectural Big RulesCoarse Grained Business Services XML Document-based

Mostly Async Conversational

Design

Focused

Page 18: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Reliable Secure/Identity

Policy Driven Registered and Retrieved

SOA Architectural Big RulesQualities

Focused

Page 19: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Standards

Focused

WSDL Described BPEL Orchestrated

SOA Architectural Big Rules

JBI-based

Page 20: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Guide to the SOA Galaxy

You are here

4. ESB2. BPEL

3. JBI

5.Java CAPS 1. Intro

6. The Answer To Everything

Page 21: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Need for Business Process• Developing the web services and exposing

the functionality is not sufficient• We also need a way to orchestrate these

functionality in the right order • Example:

– Concert ticket purchase Web service has 3 operations, which need to be performed in the following order• Getting a price quote• Purchase a ticket• Confirmation and cancellation

Page 22: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

BPEL (Business Process Execution Language)

• XML-based language used to specify business processes based on Web Services

• BPEL processes describe– Long running, stateful, transactional,

conversations between two or more partner web services

• BPEL is key to implementing SOA Big Rules– Conversational– Mostly Async– XML Document-based– Orchestrated

Page 23: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

BPEL “Fixes” WSDL

• WSDL: unordered set of operations– Operations are message exchanges

• Need rules for ordering• Support for sequencing• Support for concurrency• Choreography with external entities

Page 24: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

BPEL Is a Web Service Sequencing Language

• Process defines “conversation” flow chart– Conversation consists of only WSDL-described

message exchanges– BPEL provides and consumes WSDL defined

services• Process instance is a particular

conversation following the chart– Execution systems can support multiple

concurrent conversations

Page 25: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

BPEL Works With WSDL• Web services are described in WSDL

– Operations are message exchanges– Each operation represents an individual unit of

action

• We need a way to orchestrate these operations with multiple web services in the right order to perform a Business process– Sequencing, conditional behavior etc.

• BPEL provides standard-based orchestration of these operations

Page 26: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

BPEL: Relationship to Partners

Orchestrating Process(BPEL)

InventoryChecker Service

Credit checker Service

Another Partner Service

Customer Service

WSDL

Page 27: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

BPEL Document Structure<process> <!– Definition and roles of process participants -->

<partnerLinks> ... </partnerLinks> <!- Data/state used within the process --> <variables> ... </variables> <!- Properties that enable conversations --> <correlationSets> ... </correlationSets> <!- Exception handling --> <faultHandlers> ... </faultHandlers>

<!- Error recovery – undoing actions --> <compensationHandlers> ... </compensationHandlers> <!- Concurrent events with process itself --> <eventHandlers> ... </eventHandlers> <!- Business process flow --> (activities)*</process>

Page 28: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

BPEL ActivitiesBasic Activities• <invoke>• <receive>• <reply>• <assign>• <throw>• <wait>• <empty>

Structured Activities• <sequence>• <while>• <pick>• <flow>• <scope>• <compensate>• <switch>• <link>

Page 29: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

BPEL: Basic Activities• <invoke>

– To invoke a one-way or request/response operation on a portType offered by a partner

• <receive>– To do a blocking wait for a matching message to

arrive– Can be the instantiator of the business process

• <reply>– To send a message in reply to a message that was

received through a <receive>

– The combination of a <receive> and a <reply> forms a request-response operation on the WSDL portType for the process

Page 30: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

BPEL: Basic Activities• <assign>

– Can be used to update the values of variables with new data

• <throw>– Generates a fault from inside the business process

• <wait>– Allows you to wait for a given time period or until a certain

time has passed

• <empty>– Allows you to insert a "no-op" instruction into a business

process– This is useful for synchronization of concurrent activities, for

instance

Page 31: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

BPEL: Structured Activities• <sequence>

– Perform activities in sequential order• <flow>

– Perform activities in parallel• <switch>

– Conditional choice of activities• <scope>

– Enclose multiple activities in a single scope

Page 32: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Example Business Process

Invoke <InventoryService> Invoke <CreditService>

Reply <Invoice>

Receive <PO> <sequence>

<flow>

</sequence>

Page 33: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Authoring BPEL?Authoring BPEL?

• BPEL is difficult to write– Programming in XML: arghhhh!– XML Schema

• Real-world schemas are huge and complex• Run the other way if you can

– WSDL extensions• As if WSDL weren’t confusing enough

• BPEL is an execution language only– Not a modeling notation

Page 34: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

BPMN (Business Process Modeling Notation)(Business Process Modeling Notation)

• Notation for business process diagrams – Based on flowcharting techniques– Has special considerations for Web Services– Readily understandable by...

• Business users• Business analysts• Software developers

• But, BPMN and BPEL are complimentary– BPEL: execution language without a notation– BPMN: notation with a comprehensive

mapping to BPEL

Page 35: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Visual Service Orchestration

Page 36: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Guide to the SOA Galaxy

You are here4. ESB

2. BPEL

3. JBI

5. Java CAPS1. SOA

6. The Answer To Everything

Page 37: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

SOA– Decouples service consumers from providers– Separates business logic from services– Enables dynamic service discovery/use– Appealing to large enterprises

(flexible/scalable)Business integration

– Application to application (A2A)– Business to business (B2B)– Business process management (BPM)– Many architectures, technologies, vendors

Page 38: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

What is JBI (JSR-208)?● One of the biggest motivation for SOA is to

reduce the cost of application integration● Standard-based, pluggable infrastructure

– Service Engines: Provides business logic and integration services

– Binding Components: Provides communications protocols

• Composite, event-driven services• Extensible administration• Loose coupling via WSDL message exchanges

Page 39: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

JBI (JSR-208)– Standardizes:

• A Java technology-based Extensible Meta-container • Installable components (binding components and

service engines)• Packaging/deployment (service units and service

assemblies)• Normalized message routing (WSDL-2.0 based)• Component/deployment management (Ant and

JMX™ API)• And more

Page 40: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Runtime: Java EE Platform and Java Business Integration

• Java Business Integration serves as messaging infrastructure– Java EE web services interact through Java

Business Integration– Java Business Integration bindings allow

remote consumers and providers– Add other service technologies as Java

Business Integration components• Transparent to programmer using Java EE

technology– Reuse without re-coding

Page 41: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

JBI Architecture

Page 42: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

JBI—Service Engine

• Hosts business logic implementing services• Exposes service endpoints

– Agnostic of protocol and transport• Engages in Message Exchange Patterns

– Normalized messages—target remote service• Is a target for deployment—a container

– Engine-specific artifacts– May cause endpoint activation

Page 43: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

JBI—Binding Component• Handles protocol-specific message re-

formatting– Deals with wire transport of messages– E.g. SOAP/HTTP, FTP, SMTP, JMS, ebMS,

AS2, etc.• Should contain no business logic• Exposes proxy endpoints for remote

services• Proxies JBI services to remote consumers• (Re)Used by multiple service engines

Page 44: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

JBI Administration

• Standard installation of components– Portable archive format

• Service Assembly (SA)– Portable package of a composite service

• Service Unit (SU) – Each deployed to one component type

• Lifecycle Management– Start/stop/shutdown

Page 45: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

JBI—Service Assembly Deployment

SA=Proxy Service

activity.xml

JBI.xml

transform.xslt

endpoint.xml

SU1

SU2

SU3

BPELEngine

XSLTEngine

SOAP/HTTPBinding

Page 46: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Guide to the SOA Galaxy

You are here

4. ESB2. BPEL

3. JBI

5. Java CAPS1. Intro

6. The Answerto Everything

Page 47: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

• Distributed services architecture• Enterprise-grade communications

backbone for reliable messaging• Intelligent routing and content-based

routing• Process coordination• Flexible security framework• XML transformation• Management

Enterprise Service Bus

Page 48: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

• Open source, based on the JSR-208 RI• + Multiple JBI instances (+ synchronization)• + Distributed normalized message

routing/proxying• + Central administration (+ CLI and Web

Console)• And more

Project Open ESB

Page 49: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

JBI and Project Open ESB

• Java Business Integration– Service Unit– Component– Service Assembly– Standardized MBeans

• Project Open ESB– Distributed JBI– Centralized Management

Page 50: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Guide to the SOA Galaxy

You are here

4. ESB2. BPEL

3. JBI

5 Java CAPS. 1. Intro

6. Answer to Everything

Page 51: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Composite Applications• A composite application is a collection of existing

and independently developed applications and new business logic, orchestrated together into a brand new solution of a business problem that none alone can solve

• Such an application looks to the user like a regular new interactive application, yet in reality it may be only 10 percent new and 90 percent an assembly of pre-existing components or data; the “glue” that brings a composite application together is integration technology

Page 52: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Sun's Vision for the SOA Platform

Page 53: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Sun's SOA Platform

Page 54: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Java ES and Suites

JavaTM Enterprise System

ApplicationPlatform B2B

ESBWebInfrastructure

CompositeApplication Platform

Identi

tyMa

nage

ment

Comm

unica

tions

Avail

abilit

y

Mana

gem

ent T

ools

Deve

lope

r Too

ls

Over 1 MillionJava ES

Subscribers

Storage + STK

Page 55: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Java Composite Application Platform Suite

Page 56: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

PositioningJava CAPS

Unique Combination of:● Unified● Comprehensive● Agile

Value Proposition:

The industry's most complete, secure, unified and scalable platform for the development, deployment and management of enterprise integration and composite applications

Page 57: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Open ESB and Java CAPSOpen ESB

Entry Level, Standards-Based ESBJBI Architecture

Available: 1H 2006

Java CAPS SuitesFifth-generation, ESB-based

Integration Suite with full functionality

Available NOW

Use: For Develop

ers

Use: Run Your Enterprise on

this.

Page 58: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Guide to the SOA Galaxy

4. ESB2. BPEL

3. JBI

5 Java CAPS.1. Intro

6. The Answer To Everything

You are here(finally)

Page 59: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

ToolsThe Answer to Everything...

Page 60: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

SOA Tool SOA Tool NetBeans EnterpriseNetBeans EnterprisePack 5.5Pack 5.5Rapid Architecture and Design of ServicesRapid Architecture and Design of Services

Page 61: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Overview• Will focus on higher level features that are

important to building enterprise applications..for example....– SOA

• Composite Application Building• Business Process Orchestration• Integration• Rich Visual XML Tools

– Application Lifecycle Management• UML Modeling• Project Management• Automatic Project Wiki Documentation

Page 62: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Enterprise Customer NeedDesign of Composite Services

Page 63: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Rapid Architecture and Design of Services

EnterprisePlatform J2EE

1.5

SOA

XMLweb Services

ApplicationPortability

DataPortability

Sun Web Services Developer Pack

Sun Java SystemApplication Server

Page 64: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Visual Service Orchestration• Service Orchestrations

– Model Business process in the Orchestration Designer

– Generate deployable BPEL based orchestrations

– Round trip engineering between visual Web service model and BPEL process

– Import and export BPEL

Page 65: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Visual Service Orchestration

Page 66: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Summary• SOA enables flexible and agile enterprise

application architecture• JBI provides standard based SOA

framework• BPEL enables standard based

orchestration of services• NetBeans Enterprise Pack is the tool to

use for building SOA-enabled enterprise applications

Page 67: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Call For Action• Try “free” Java Studio Enterprise for

building industry strength Web services• Try Technology Preview version of

NetBeans Enterprise Pack 5.5 for integrating SOA-enabled services

• Join Sun Developer Network (SDN) for up-to-date SOA information

Page 68: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Resources• SDN (Sun Developer Network)

SOA/WebServices– http://java.sun.com/reference/soawebservices/

• Java Studio Enterprise– http://developers.sun.com/prodtech/javatools/j

senterprise/• NetBeans Enterprise Pack 5.5

– http://enterprise.netbeans.org

Page 69: A Guide to the SOA Galaxy: Strategy, Design and Best Practices

Technical articles

Sun Developer Network

http://developer.sun.com

Increasing developer productivity with:

Empowering the Developer

Tutorials and sample codesMonitored forum support

Community involvementthrough user groups, events,and conferencesAnd more...