1 ws technologies iii orchestration roberto bruni dipartimento di informatica università di pisa...

25
1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration IMT- Institutions Markets Technologies - Alti Studi Lucca

Post on 22-Dec-2015

222 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

1

WS Technologies IIIOrchestration

Roberto BruniDipartimento di Informatica Università di Pisa

Models and Languages for Coordination and Orchestration

IMT- Institutions Markets Technologies - Alti Studi Lucca

Page 2: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

2

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

Web Services to Bits Lingua Franca: XML

firmly established, platform independent information and data encoding

Communication Protocol: SOAP high flexibility, works on different transport

protocols (HTTP, SMTP) Service Discovery: UDDI

browser-accessible service registry, white / yellow / green pages

Service Descriptions: WSDL unambiguous, machine-readable, tells how

(interfaces), what (transports protocols) and where (endpoints)

Page 3: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

3

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

The Car Analogy WS is primarily an integration technology

WS composition MUST BRIDGE THE GAP between business people and technologists in an organization

WS are units of work, each handling a specific functional task

designed and built by technical people like a whole car engine, a car frame, transmission

Tasks ARE TO BE COMBINED into more complex business-oriented tasks

business process architects can then aggregate WS in solving business level problems

like assembling the engine, the frame and the transmission without having to look at the many pieces within them

and the manufacturer does not matter (interoperability)

Page 4: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

4

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

The "Coffee Bar" Problem The description of WS interactions is an important

problem, in particular with regard to the exchange of messages, their composition, and the sequences in which they are transmitted and

received these interactions may take place among composite

services, which span and interact across organizational boundaries

Think of a coffee bar service that let you order an espresso pay for the espresso and get the receipt but you don't know what to do first

it depends from the coffee bar

Page 5: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

5

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

Is the Whole more than just the Sum of its Parts? Or less?

area:10*12/2 = 60

area:60-2 = 58

1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10

1

2

3

4

6

5

7

8

9

11

10

1

2

3

4

6

5

7

8

9

11

10

12

Page 6: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

6

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

Dominoes and a Chessboard:a Tiling Problem

64-2 = 62cells

31 dominoes

Page 7: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

7

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

Dominoes and a Chessboard:a Tiling Problem

64-2 = 62cells

31 dominoes

Page 8: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

8

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

Contents Orchestration and Choreography WSFL Transactions and Compensations BPEL4WS

Page 9: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

9

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

Contents Orchestration and Choreography WSFL Transactions and Compensations BPEL4WS

Page 10: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

10

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

Web Service Composition WS composition is an emerging paradigm for

application integration within and across organization boundaries

A landscape of languages and techniques for WS composition has emerged

and is continuously being enriched with new proposals from different vendor coalitions

Business collaborations require long-running interactions driven by explicit process models

Accordingly, it is a natural choice to capture the logic of a composite web service using business process modeling languages tailored for web services

Many such languages have recently emerged WSCI, XLANG, BPML, WSFL, BPEL4WS, BPSS, XPDL

Page 11: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

11

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

Some Scenarios Web orders

at least three entities are involved customer provider carrier

Web auctions multiple iterations are required some event sequences are disallowed

it does not make sense for a party to outdo its own offer

Page 12: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

12

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

Service Composition To build novel functionalities by assembling

available services in a proper way both as a new web service and as an interaction model among distributed

services Two main approaches

a centralized flow invokes the services according to some internal logic / policy

separately designed services interact according to a suitable conversation pattern to reach their goals

intrinsically distributed perspective

Page 13: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

13

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

Flows Operational description of control logic

to explain how to use the service in the proper way

invocation order of certain methods elaboration strategy of requests

Single activities composing the flow can be realized by different entities

Certain flows can become services on their own

Page 14: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

14

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

Challenges Traditional workflow models rely on

message-based computing methods that are tightly coupled to specific B2B protocols exploit controllable environment (not for the

web) Parties are normally known in advance

contrast with dynamic discovery Traditional models normally call for

centralized engines but the nature of the web is widely distributed

Page 15: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

15

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

Goals The challenge will be to describe WS

from an external point of view without knowing how internally operate

independently of any particular integration model

precisely enough to allow interaction other components must understand how to properly

interact with them (how they fit) in the context of each specific

message exchange in which they can participate

Page 16: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

16

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

Orchestration and Choreography

Orchestration describes how WS can interact with each other at

the message level, including the business logic and execution order of the interactions

Choreography tracks the sequence of messages that may involve

multiple parties and multiple sources, including customers, suppliers and partners

The entirely deliberate analogy is with the way in which skilled musicians and dancers

co-ordinate their actions while carrying out predetermined instructions

Page 17: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

17

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

The Ballet Analogy Consider a dance with more than one dancer

each dancer has a set of steps to perform dancers orchestrate their own steps because they

are in complete control of their domain (their body)

a choreographer ensures that the steps all of the dancers make is according to some overall scheme (the choreography)

the dancers have a single view point of the dance choreography is the multi-party or global view point of

the dance

Page 18: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

18

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

Orchestration vs Choreography I

Orchestration is about describing and executing a single view point model Traditional Workflow Management Systems

centralised schedulers of (distributed) activities Choreography is about describing and

guiding a global model The single-view point model can be derived from

the global-model by projecting based on participant

But the distinction can blur in many occasions

Page 19: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

19

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

Orchestration implies a centralized control mechanism closer to an executable framework

Choreography has no centralized control an abstract discipline control is shared between domains

that are responsible for their tasks describing peer to peer interaction in a global

model by means of a choreography description language

Orchestration vs Choreography II

Page 20: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

20

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

Web Services Choreography

Web Services Choreography concerns the observable interactions of services with their users

users may, in turn, be other WS, applications or human beings

The problems of WS choreography are largely focused around

message exchange and sequencing these messages in time to the appropriate

destinations To fulfil the needs of the Web Services community,

these aspects of Web Services must be developed and standardized in an interoperable manner

Page 21: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

21

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

Choreography Description A choreography description is

a multi-party contract that describes from global view point the external

observable behaviour across multiple clients (which are generally Web Services but not exclusively so)

in which external observable behaviour is defined as

the presence or absence

of messages that are exchanged between a Web Service and its clients

Page 22: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

22

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

How is a Choreography Used?

The main use of a choreography description is: to precisely define the sequence of interactions

between a set of cooperating web services in order to promote a common understanding between

parties and to make it as easy as possible to:

promote a common understanding between WS participants;

automatically validate conformance; ensure interoperability; increase robustness; and to generate code skeletons

Page 23: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

23

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

How is a Choreography Used?Examples

To aid the testing of WS through the generation of test messages that could be sent to parties

by means of an appropriate vendor specific tool that reads the choreography description and manages the test interaction according to it

To validate the multi-party observable interactions amongst a collection of WS

ex. a hotel may load a choreography description into a vendor specific tool which informs them of any breaches of the choreography

To show the presence of useful properties such as lock freedom and leak freedom in the behavioural contract

in this sense a choreography description acts as a model of the behaviour across a number of Web Services

which in turn can be subject to static analysis to show that if and only if the underlying Web Services behave according to the contract that the interaction between the Web Services will exhibit these properties

Page 24: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

24

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

Benefit of Choreography A standardized language for the description

of choreographies offers many benefit: the construction of more robust Web Services the enabling of more effective interoperability of

WS through behavioural multi-party contracts, which are choreography descriptions

the reduction of the cost of implementing Web Services by ensuring conformance to expected behaviour

the increasing of the utility of WS as they will be able to be shown to meet contractual behaviour

Page 25: 1 WS Technologies III Orchestration Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration

25

Roberto Bruni @ IMT Lucca 22 March 2005

Models and Languages for Coordination and Orchestration

InstitutionsMarketsTechnologies

IMT

Model-Driven Architecture At the highest conceptual level (of SOA)

service components as building blocks written in many different languages and platforms

assembled without really writing any line of code

blocks composed in workflows tools can monitor the execution of (group of) services

developers can work in a Model-Driven Architecture and put away the use of regular programming language

application design