You are on page 1of 23

CSE 311 – Web Services

Chapter 4: Service Communication and


Coordination

Department of Computer Science and Engineering


School of Engineering, Presidency University
Contents
1. Web Service Communication and Coordination
2. Orchestration
3. Choreography
4. Technical Requirements for Orchestration and Choreography

Dept. of CSE, SOE, Presidency University 2


Web Service Coordination

 Orchestration and choreography are terms


related to connecting Web services in a
collaborative fashion.
 The capabilities offered by the available
standards will be vital for building dynamic,
flexible processes. The goal is to provide a set
of open, standards-based protocols for
designing and executing these interactions
involving multiple Web services.

Dept. of CSE, SOE, Presidency University 3


Web Service Orchestration

 Refers to an executable business process that


may interact with both internal and external Web
services.
 Orchestration describes how Web services can
interact at the message level, including the
business logic and execution order of the
interactions.
 These interactions may span applications and/or
organizations, and result in a long-lived,
transactional process. With orchestration, the
process is always controlled from the perspective
of one of the business parties.

Dept. of CSE, SOE, Presidency University 4


Orchestration Example

Dept. of CSE, SOE, Presidency University 5


Web Service Orchestration

Dept. of CSE, SOE, Presidency University 6


Orchestration Benefits

•Easy to maintain and manage as we unify the


business process at the center.
•In synchronous processing, the flow of the
application coordinates efficiently.

Dept. of CSE, SOE, Presidency University 7


Limitations

•Creating dependency due to coupled services. For example,


if service A is down, service B will never be called.
• The orchestrator has the sole responsibility. If it goes
down, the processing stops and the application fails.
•We lose visibility since we are not tracking business
process.

Dept. of CSE, SOE, Presidency University 8


Web Service Choreography

 More collaborative in nature, where each party involved in the process describes the part they play in the
interaction.
 Choreography tracks the sequence of messages that may involve multiple parties and multiple sources.
 It is associated with the public message exchanges that occur between multiple Web services.

Dept. of CSE, SOE, Presidency University 9


Choreography Example

Dept. of CSE, SOE, Presidency University 10


Web Service Choreography

Dept. of CSE, SOE, Presidency University 11


Benefits

•Enables fast processing. As no dependency on the central


controller.
•Easy to add and update. The services can be removed or
added anytime from the event stream.
•As the control is distributed, there is no single point failure.
•Works well with the agile delivery model, as teams work on
certain services rather than on entire application.

Dept. of CSE, SOE, Presidency University 12


Limitations

•Complexity is the concerning issue. Each service is


independent to identify the logic and react based on the logic
provided from the event stream.
•The Business process is spread out, making it difficult to
maintain and manage the overall process.
•Mindset change is a must in the asynchronous approach.

Dept. of CSE, SOE, Presidency University 13


Orchestration vs Choreography

 Orchestration differs from choreography in that it describes a process flow between


services, controlled by a single party. More collaborative in nature.
 Choreography tracks the sequence of messages involving multiple parties, where no
one party truly "owns" the conversation.

Dept. of CSE, SOE, Presidency University 14


Orchestration vs Choreography

Dept. of CSE, SOE, Presidency University 15


Orchestration Vs Choreography

Dept. of CSE, SOE, Presidency University 16


Example – Web Services

Dept. of CSE, SOE, Presidency University 17


Technical Requirements for Orchestration
and Choreography

1. Flexibility: One of the most important considerations is the flexibility offered. Flexibility can be achieved
by providing a clear separation between the process logic and the Web services invoked. This separation
can usually be achieved through an orchestration engine that handles the overall process flow. With this
flexibility, an organization can easily swap out services as business needs change.

Dept. of CSE, SOE, Presidency University 18


Technical Requirements for Orchestration
and Choreography

2. Basic and structured activities: An orchestration language must support activities for both
communicating with other Web services and handling workflow semantics. One can think of a basic activity
as a component that interacts with something external to the process itself. In contrast, structured activities
manage the overall process flow, specifying what activities should run and in what order.

Dept. of CSE, SOE, Presidency University 19


Technical Requirements for Orchestration
and Choreography

3. Recursive composition: A single business process can interact with multiple


Web services. However, a business process can itself be exposed as a Web service,
enabling business processes to be aggregated to form higher-level processes.

Dept. of CSE, SOE, Presidency University 20


Technical Requirements for Orchestration
and Choreography

4. Persistence and correlation: The ability to maintain state across Web services


requests is an important requirement, especially when dealing with asynchronous Web
services. The language and infrastructure should provide a mechanism to manage data
persistence and correlate requests in order to build higher-level conversations.

Dept. of CSE, SOE, Presidency University 21


Technical Requirements for Orchestration
and Choreography

5. Exception handling and transactions: Orchestrated Web services that are long-


running must also manage exceptions and transactional integrity. For example,
resources cannot be locked in a transaction that runs over a long period of time.

Dept. of CSE, SOE, Presidency University 22


ORCHESTRATION CONCEPTS

ADMISSION INSURANCE

INVOKE

RESPONSE

HOSPITAL CLIENT
(CONTROLLER)

REPORT
BILLING

Dept. of CSE, SOE, Presidency University 23

You might also like