Orchestration, Choreography and Collaboration in Web Services and - - PowerPoint PPT Presentation

orchestration choreography and collaboration in web
SMART_READER_LITE
LIVE PREVIEW

Orchestration, Choreography and Collaboration in Web Services and - - PowerPoint PPT Presentation

Orchestration, Choreography and Collaboration in Web Services and ebXML Ron Ten-Hove Staff Software Engineer Sun Microsystems | JavaOne 2003 | Session 3176 Goals Examine message sequencing in Web Services and Business Web Services 2


slide-1
SLIDE 1 | JavaOne 2003 | Session 3176

Orchestration, Choreography and Collaboration in Web Services and ebXML

Ron Ten-Hove Staff Software Engineer Sun Microsystems

slide-2
SLIDE 2 | JavaOne 2003 | Session 3176 2

Goals

Examine message sequencing in Web Services and Business Web Services

slide-3
SLIDE 3 | JavaOne 2003 | Session 3176 3

Ron Ten-Hove

  • Staff Engineer, Sun Java™ Web Services

Business Integration Product Development

─ Developed EAI Products for Forté Software (now part of Sun Microsystems) ─ EAI Web Services ─ ebXML BPSS ─ WSCI ─ JSR 208

  • Et cetera
slide-4
SLIDE 4 | JavaOne 2003 | Session 3176 4

The next important area of development

  • f Web Services is so-called Choreography.

Many new concepts and specifications are emerging.

slide-5
SLIDE 5 | JavaOne 2003 | Session 3176 5

Agenda

  • Definitions
  • Abstract Models
  • Web Services
  • Business Web Services
  • Summary
slide-6
SLIDE 6 | JavaOne 2003 | Session 3176 6

Service-Oriented Architecture (SOA)

  • Services, Services Everywhere
  • Business Processes:

─ Use Services ─ Provide Services

  • Useful EAI Approach
  • SOAP + WSDL = Web Services
  • ebXML Business Web Services
slide-7
SLIDE 7 | JavaOne 2003 | Session 3176 7

Some Terminology (WS Flavored)

  • Collaboration

─ Two or more peers ─ Business-oriented goals

  • Orchestration

─ Running business processes

  • Choreography

─ Sequencing “interface” ─ Client/Server

slide-8
SLIDE 8 | JavaOne 2003 | Session 3176 8

Definitions (Cont.)

Trading Partner’s Service Service Service Service Service

Firewall

Process Engine

slide-9
SLIDE 9 | JavaOne 2003 | Session 3176 9

Definitions (Cont.)

Collaboration Service Service Service Service

Firewall

Process Engine Trading Partner’s Service

slide-10
SLIDE 10 | JavaOne 2003 | Session 3176 10

Definitions (Cont.)

Collaboration Orchestration Service Service Service Service

Firewall

Process Engine Trading Partner’s Service

slide-11
SLIDE 11 | JavaOne 2003 | Session 3176 11

Definitions (Cont.)

Collaboration Orchestration Choreography Service Service Service Service

Firewall

Process Engine Trading Partner’s Service

slide-12
SLIDE 12 | JavaOne 2003 | Session 3176 12

Choreography

  • Sequencing of Service operations
  • Direct dependencies
  • Interface

─ Observable messages

  • Constrains client using Service
slide-13
SLIDE 13 | JavaOne 2003 | Session 3176 13

Orchestration

  • Process Engine

─ Invokes Services ─ Offers Services ─ Stateful ─ Complex rules:

  • Sequencing
  • Concurrent sequences (flows)
  • Synchronization of flows
  • Conforms to Choreography for each

Service used

slide-14
SLIDE 14 | JavaOne 2003 | Session 3176 14

Collaboration

  • B2B (Peer-to-peer)
  • Message exchange only
  • Like paired services, but

─ Uses Internet ─ Trading Partner Agreement ─ Business Semantics

  • Electronic Data Interchange (EDI)
slide-15
SLIDE 15 | JavaOne 2003 | Session 3176 15

Abstract Models

  • Abstract Models

─ Influence Specifications ─ Model Checking ─ Emphasize certain aspects

  • π-Calculus
  • Petri Nets
  • State Diagrams/Activity Diagrams
slide-16
SLIDE 16 | JavaOne 2003 | Session 3176 16

π-Calculus

  • Model of concurrent computation
  • Interacting, named agents
  • Dynamic configuration
  • “Calculus of Mobile Processes”
  • Influence on newer process specifications

x _ y y _ z z _ u _ z _ u <foo> <C> B C A

slide-17
SLIDE 17 | JavaOne 2003 | Session 3176 17

Petri Nets

  • Model of concurrent, interacting systems
  • Graph of

─ Places ─ Transitions ─ Directed arcs connecting transitions and places

  • Models

─ Collaboration ─ Orchestration

  • Good for modeling, not execution
slide-18
SLIDE 18 | JavaOne 2003 | Session 3176 18

Petri Nets

slide-19
SLIDE 19 | JavaOne 2003 | Session 3176 19

State Machine

  • States linked by directed transitions
  • More detail than Petri net
  • Simple synchronization primitives
  • Models

─ Simple orchestration ─ Most choreographies

  • UML StateChart, Sequential Function Chart,

Grafcet, etc.

slide-20
SLIDE 20 | JavaOne 2003 | Session 3176 20

State Diagram

Place Order Arrange Insurance Book Shipping

slide-21
SLIDE 21 | JavaOne 2003 | Session 3176 21

Activity Diagrams

  • UML variation of State Machine
  • Roles (“Swim lanes”)
  • Initiating role
  • Message exchange between roles
  • Models

─ Collaboration ─ Orchestration (optionally)

slide-22
SLIDE 22 | JavaOne 2003 | Session 3176 22

Activity Diagrams

Buyer Seller et cetera...

Send Quote Request Accept Receipt Accept Receipt Send Receipt

slide-23
SLIDE 23 | JavaOne 2003 | Session 3176 23

Web Services

  • Technology stack
  • Based on web protocols
  • Port 80 as a tunnel
  • SOAP 1.1

─ RPC ─ Message exchange

  • WSDL 1.1

─ Description of service ─ Bind service to SOAP

Application SOAP HTTP TCP IP Datalink Physical

slide-24
SLIDE 24 | JavaOne 2003 | Session 3176 24

The Problem With Web Services

  • Web Services Description Language 1.1

─ Operations, Operations Everywhere ─ Services modeled as message exchanges ─ Unordered

  • No Choreography
  • No Collaboration

─ Paired services pattern

  • Orchestration: Not applicable
slide-25
SLIDE 25 | JavaOne 2003 | Session 3176 25

WSDL Structure

Adapted from: Microsoft MSDN

Part Part Part Part Operation Binding Service ... ... ...

Message Message Port Type Port ...

slide-26
SLIDE 26 | JavaOne 2003 | Session 3176 26

WSDL Structure

Adapted from: Microsoft MSDN

Part Part Part Part Operation Binding Service ... ... ...

Message Message Port Type Port ...

Abstract Endpoint Type

slide-27
SLIDE 27 | JavaOne 2003 | Session 3176 27

WSDL Structure

Adapted from: Microsoft MSDN

Part Part Part Part Operation Binding Service ... ... ...

Message Message Port Type Port ...

Abstract Endpoint Type Concrete Endpoint

slide-28
SLIDE 28 | JavaOne 2003 | Session 3176 28

WSDL Structure

Adapted from: Microsoft MSDN

Part Part Part Part Operation Binding Service ... ... ...

Message Message Port Type Port ...

Abstract Endpoint Type Concrete Endpoint Endpoint Instance

slide-29
SLIDE 29 | JavaOne 2003 | Session 3176 29

WSDL Structure

Adapted from: Microsoft MSDN

Part Part Part Part Operation Binding Service ... ... ...

Message Message Port Type Port ...

Abstract Endpoint Type Concrete Endpoint Endpoint Instance

slide-30
SLIDE 30 | JavaOne 2003 | Session 3176 30

Web Service Choreography

  • Layered on top of PortType

─ Reuse

  • Client/Service contract
  • Ordering of Operation invocations
slide-31
SLIDE 31 | JavaOne 2003 | Session 3176 31

Open for Read Idle Open for Update

Choreography Example

L

  • g

i n A d m i n ( ) L

  • g

i n U s e r ( )

Update() Read()

LogOff()

LogOff()

Read()

slide-32
SLIDE 32 | JavaOne 2003 | Session 3176 32

Simple Choreography Isn’t Enough

  • Pure Client/Service

─ Only one initiator ─ Synchronous Messaging

  • Single Service Only
slide-33
SLIDE 33 | JavaOne 2003 | Session 3176 33

Specifications to the Rescue

  • WSCL 1.0

─ Basic choreography language ─ Layered directly atop WSDL 1.1

  • WSCI 1.0

─ Rich choreography language ─ Layered directly atop WSDL 1.1

  • BPEL4WS

─ Broad orchestration language ─ Choreography support ─ Layered directly atop WSDL 1.1

slide-34
SLIDE 34 | JavaOne 2003 | Session 3176 34

Added Features

  • Correlation
  • Transactions
  • Exceptions
  • Compensation
  • Roles
  • Dynamic Participation
slide-35
SLIDE 35 | JavaOne 2003 | Session 3176 35

Correlation

  • Asynchronous responses

─ How to correlate to request?

  • ebXML message meta-data

─ Unique message IDs ─ Ref-to message ID

  • Use message content

─ E.g., purchase order number

  • Multiple correlation items possible
slide-36
SLIDE 36 | JavaOne 2003 | Session 3176 36

Send Purchase Order Send Invoice Ship Goods Send Payment Accept Invoice Accept PO

Correlation Example

Buyer Seller

/po/head@no /inv/ref/po /inv/id/num /pay/ref/inv

slide-37
SLIDE 37 | JavaOne 2003 | Session 3176 37

Transactions

  • Multiple operations complete or fail like

a single one

  • Various models:

─ ACID—Atomic

  • Locks resources
  • Costly for long-running operations

─ Nested (Open)

  • Relaxes isolation requirement
  • Complex error recovery
  • In tension with loose coupling
slide-38
SLIDE 38 | JavaOne 2003 | Session 3176 38

Exceptions

  • Choreography distinguishes:

─ “Happy path” ─ Error paths

  • Technical problems
  • Fault response from Service

– Multiple types

  • Error paths can

─ Retry ─ Complain ─ Clean up

slide-39
SLIDE 39 | JavaOne 2003 | Session 3176 39

Compensation

  • Undo a committed transaction/operation

─ Needed in open transaction model ─ Distinct from rollback

  • Explicit compensation handler

─ Sequence of operations to achieve “undo”

slide-40
SLIDE 40 | JavaOne 2003 | Session 3176 40

Roles

  • Assigning role names to port types
  • Pairing roles

─ E.g., Buyer, Seller ─ Links port types directly

slide-41
SLIDE 41 | JavaOne 2003 | Session 3176 41

Dynamic Participation

  • Selection of target service at run-time
  • Uses dynamic data

─ Message contents ─ Previous message contents

  • π-Calculus influence

─ Service address is a channel ─ Port type is channel type

slide-42
SLIDE 42 | JavaOne 2003 | Session 3176 42

Business Web Services

Firewall

Trading Partner’s Services Service Service Service Service Process Engine Business Services Interfaces Business Services Interfaces

slide-43
SLIDE 43 | JavaOne 2003 | Session 3176 43

Business Web Services

  • Web Services Plus:

─ Reliability ─ Security ─ Direct support for business semantics

  • EDI—Electronic Data Interchange

─ Electronic business documents ─ Many data formats ─ Value Added Network—VAN ─ Expensive

slide-44
SLIDE 44 | JavaOne 2003 | Session 3176 44

Business Web Services

  • Binary or multi-party collaborations
  • Complex sequencing
  • Trading partner agreements (contracts)
  • Peer-to-peer shared views:

─ State management ─ Business semantics, rules, constraints

  • Integration with internal business systems:

─ Business processes ─ Applications

slide-45
SLIDE 45 | JavaOne 2003 | Session 3176 45

Business Web Services Are Different

  • B2B Transactions

─ Coarse-grained

  • Map to business activities

─ Have economic and legal consequences ─ No shared infrastructure

  • Internet

─ Insecure ─ Unreliable ─ Ubiquitous, cheap

slide-46
SLIDE 46 | JavaOne 2003 | Session 3176 46

ebXML for Business Web Services

  • “Cheap” EDI:

─ Internet protocols

  • Reliable, secure messaging atop SOAP

─ XML for data ─ Standard business documents:

  • CC—Core Components
  • UBL—Universal Business Language

─ Standards based, interoperable

slide-47
SLIDE 47 | JavaOne 2003 | Session 3176 47

ebXML for Business Web Services

  • Suite of loosely-coupled specifications

─ CPP/CPA

  • Trading partner agreement

─ Message Handler

  • Secure, reliable messaging over Internet
  • CPA configures handler quality-of-service

for each transaction

─ BPSS

  • Binary and multi-party collaboration
  • Business transaction model

─ Core Components, UBL

slide-48
SLIDE 48 | JavaOne 2003 | Session 3176 48

CPP/CPA

  • Ultimate WSDL
  • Trading partner agreement

─ Roles assigned to partners ─ All messages described ─ Endpoints defined ─ All message exchanges defined

  • Quality of service

– Security – Reliability

slide-49
SLIDE 49 | JavaOne 2003 | Session 3176 49

Message Handler

  • Configured by CPA(s)
  • Provides

─ Security

  • Confidential
  • Tamper-proof
  • Authentication of sender

─ Reliability

  • Once-and-only-once delivery
  • Interoperable

─ Many implementations available

slide-50
SLIDE 50 | JavaOne 2003 | Session 3176 50

BPSS

Business Process Specification Schema

─ Collaborative business process definition

  • Role-based
  • Binary and multi-party

─ Defined atop abstract model of MSH ─ Shared view of process state

  • Message exchange

– business signal protocol

  • Common process definition

─ Rich set of business-oriented features

slide-51
SLIDE 51 | JavaOne 2003 | Session 3176 51

BPSS

  • Process models similar to UML Activity

Diagrams

─ Stereotyped activity “Business Transaction”

  • Business protocol

– Multiple document exchanges – Time outs

  • Simple set of result types

– Succeeded, – Failed for technical reasons, failed for business reasons, etc.

─ Roles mapped to swim lanes ─ Concurrent activities

slide-52
SLIDE 52 | JavaOne 2003 | Session 3176 52

BPSS Example

Buyer Seller

Get Quote Let Purchase Order

Send Payment Send Shipment Data

Issue Invoice Send Ship Notice Success

slide-53
SLIDE 53 | JavaOne 2003 | Session 3176 53

Quality of Service: Security, Reliability

Quote Request Receipt Acceptance Quote Receipt Acceptance

Business Transaction Activity: Get Quote

Buyer Seller

Business Web Service Interface Business Web Service Interface Message Handler Message Handler

slide-54
SLIDE 54 | JavaOne 2003 | Session 3176 54

Summary

Service Service Service Service

Firewall

Process Engine

Trading Partner’s Services

slide-55
SLIDE 55 | JavaOne 2003 | Session 3176 55

Summary

WSCI WSCL Service Service Service Service

Firewall

Process Engine

Trading Partner’s Services

slide-56
SLIDE 56 | JavaOne 2003 | Session 3176 56

Summary

ebXML WSCI WSCL Service Service Service Service

Firewall

Process Engine

Trading Partner’s Services

slide-57
SLIDE 57 | JavaOne 2003 | Session 3176 57

Summary

ebXML BPEL4WS BPML WSCI WSCL Service Service Service Service

Firewall

Process Engine

Trading Partner’s Services

slide-58
SLIDE 58 | JavaOne 2003 | Session 3176 58

Summary

  • Distinct technical meanings

─ Collaboration ─ Orchestration ─ Choreography

  • Abstract models

─ Help understand specifications ─ Help drive specifications

slide-59
SLIDE 59 | JavaOne 2003 | Session 3176 59

Summary

  • Web Services

─ Service-oriented architecture ─ WSDL

  • Simple structure
  • Everybody is “fixing” it

─ Expanding Orchestration/Choreography features:

  • Correlation
  • Transactions/Exceptions/Compensation
  • Roles
  • Dynamic participation
slide-60
SLIDE 60 | JavaOne 2003 | Session 3176 60

Summary

  • Business Web Services

─ Different from Web Services ─ EDI by Internet ─ ebXML provides

  • Reliable, secure messaging
  • Trading partner agreements
  • Shared business processes
  • Business semantics
slide-61
SLIDE 61 | JavaOne 2003 | Session 3176 61

If You Only Remember One Thing…

We don’t have a Web Services silver bullet. Different solutions are needed in different parts of an enterprise’s EAI and B2B structures.

slide-62
SLIDE 62

Q&A

slide-63
SLIDE 63