Title: Tecnologie per servizi web: WSDL, WSFL
1Models and Languages for Coordination and
Orchestration IMT- Institutions Markets
Technologies - Alti Studi Lucca
WS Technologies III Orchestration
Roberto Bruni Dipartimento di Informatica
Università di Pisa
2Web 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)
3The 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)
4The "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
5Is the Whole more than just the Sum of its Parts?
Or less?
1
1
2
2
3
3
4
4
5
5
6
6
area 1012/2 60
area 60-2 58
7
7
8
8
9
9
10
10
11
11
12
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
6Dominoes and a Chessboarda Tiling Problem
31 dominoes
64-2 62 cells
7Dominoes and a Chessboarda Tiling Problem
31 dominoes
64-2 62 cells
8Contents
- Orchestration and Choreography
- WSFL
- Transactions and Compensations
- BPEL4WS
9Contents
- Orchestration and Choreography
- WSFL
- Transactions and Compensations
- BPEL4WS
10Web 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
11Some 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
12Service 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
13Flows
- 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
14Challenges
- 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
15Goals
- 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
16Orchestration 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
17The 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
18Orchestration 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
19Orchestration vs Choreography II
- 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
20Web 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
21Choreography 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
22How 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
23How 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
24Benefit 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
25Model-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