ArticleslgStudy

computer science

Service choreography

Service choreography is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Service choreography rather than just read about it. In short: Service choreography in business computing is a form of service composition in which the interaction protocol between several partner services is defined from a global perspective. The idea underlying the notion of service choreography can be summarised as follows: "Dancers dance following a global scenario without a single point of control" That is, at run-time each participant in a service choreography executes it…

Key takeaways

  • Service choreography belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Service choreography to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Service choreography from memory before moving on to harder problems.

Reference excerpt

Service choreography in business computing is a form of service composition in which the interaction protocol between several partner services is defined from a global perspective. The idea underlying the notion of service choreography can be summarised as follows:

"Dancers dance following a global scenario without a single point of control"

That is, at run-time each participant in a service choreography executes its part according to the behavior of the other participants. A choreography's role specifies the expected messaging behavior of the participants that will play it in terms of the sequencing and timing of the messages that they can consume and produce. Choreography describes the sequence and conditions in which the data is exchanged between two or more participants in order to meet some useful purpose.

Service choreography and service orchestration Service choreography is better understood through the comparison with another paradigm of service composition: service orchestration. On one hand, in service choreographies the logic of the message-based interactions among the participants is specified from a global perspective. In service orchestration, on the other hand, the logic is specified from the local point of view of one controlling participant, called the orchestrator. In the service orchestration language BPEL, for example, the specification of the service orchestration (e.g. the BPEL process file) is a workflow that can be deployed on the service infrastructure (for example a BPEL execution engine like Apache ODE). The deployment of the service orchestration specification transforms a workflow into a composite service. In a sense, service choreography and orchestrations are two sides of the same coin. On one hand, the roles of a service choreography can be extracted as service orchestrations through a process called projection. Through projection it is possible to realize skeletons, i.e. incomplete service orchestrations that can be used as baselines to realize the web services that participate to the service choreography. On the other hand, already existing service orchestrations may be composed in service choreographies.

Enactment of service choreographies Service choreographies are not executed: they are enacted. A service choreography is enacted when its participants execute their roles. That is, unlike service orchestration, service choreographies are not run by some engine on the service infrastructure, but they “happen" when their roles are executed. This is because the logic of the service choreography is specified from a global point of view, and thus it is not realized by one single service like in service orchestration. The key question which much of the research into choreography seeks to answer is this: Suppose a global choreography is constructed that describes the possible interactions between the participants in a collaboration. What conditions does the choreography need to obey if it is to be guaranteed that the collaboration succeeds? Here, succeeds means that the emergent behaviour that results when the collaboration is enacted, with each participant acting independently according to its own skeleton, exactly follows the choreography from which the skeletons were originally projected. When this is the case, the choreography is said to be realizable. In general, determining realizability of a choreography is a non-trivial question, particularly where the collaboration uses asynchronous messaging and it is possible for different participants to send messages simultaneously.

Service choreography languages In the ambit of the specifications concerning Web services, the following specifications have focused on defining languages to model service choreographies:

Web Service Choreography Description Language (WS-CDL) is a XML-based specification from the W3C for modelling choreographies using constructs inspired by Pi calculus Web Service Choreography Interface (WSCI) is an XML-based specification that was put forward to the W3C by Intalio, Sun Microsystems, BEA Systems and SAP AG, and that served as input to the Web Service Choreography Description Language (WS-CDL) Moreover, the OMG specification BPMN version 2.0 includes diagrams to model service choreographies. Academic proposals for service choreography languages include:

Let's Dance BPEL4Chor Chor Moreover, a number of service choreography formalisms have been proposed based on:

Petri Nets, for example Interaction Petri Nets and Open Workflow Nets Finite-State Machines Guarded Automata Timed Automata Pi calculus Process calculi

Web service choreography

Web service choreography (WS-Choreography) is a specification by the W3C defining an XML-based business process modeling language that describes collaboration protocols of cooperating Web Service participants, in which services act as peers, and interactions may be long-lived and stateful. (Orchestration is another term with a very similar, but still different meaning.) The main effort to get a choreography, The W3C Web Services Choreography Working Group, was closed on 10 July 2009 leaving WS-CDL as a Candidate Recommendation. "Many presentations at the W3C Workshop on Web services of 11–12 April 2001 pointed to the need for a common interface and composition language to help address choreography. The Web Services Architecture Requirements Working Draft created by the Web Services Architecture Working Group also lists the idea of Web service choreography capabilities as a Critical Success Factor, in support of several different top-level goals for the nascent Web services architecture"[1]. The problem of choreography was of great interest to the industry during that time; efforts such as WSCL (Web Service Conversation Language) and WSCI (Web Service Choreography Interface) were submitted to W3C and were published as Technical Notes. Moreover, complementary efforts were launched:

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Service choreography

Start with the simplest possible case. Write down what Service choreography claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Service choreography before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Service choreography ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Service choreography

In research
Service choreography appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Service choreography in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Service choreography is common in secondary-school and first-year university syllabi. It links to neighbouring topics Service-oriented (business computing), Web service specifications, so understanding it makes those chapters shorter.
In everyday life
Look for Service choreography outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Service choreography” →

How to study Service choreography in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Service choreography means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Service choreography out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Service choreography in simple terms?

Service choreography in business computing is a form of service composition in which the interaction protocol between several partner services is defined from a global perspective. The idea underlying the notion of service choreography can be summarised as follows: "Dancers dance following a global…

Why does Service choreography matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Service choreography?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Service choreography.

Tags

  • Service-oriented (business computing)
  • Web service specifications

Keep exploring