Table of contents
Orchestration
Formal definition
An Orchestration is a triple :
where:
- is the orchestrator — the central coordinator that drives the orchestration; has a complete view of the process and is responsible for invoking participants in the right order, passing data between them, handling responses, and managing exceptions; the orchestrator is the locus of control — all coordination passes through it
- is the participant set — the services or agents the orchestrator coordinates; each exposes an interface of invocable operations but has no knowledge of the overall workflow; from each ’s perspective, it receives a request from and returns a response; the participant’s behavior is local and reactive — it does not initiate coordination
- is the interaction protocol — the specification of how coordinates ; specifies: the sequence of invocations (which is invoked when), the data flow (which outputs become inputs), the control flow (sequential, parallel, conditional, iterative routing), and exception handling
Two invariants. is an orchestration iff:
-
Centralized control: is the sole controller of the coordination. Every interaction between participants passes through or is mediated by ; no directly invokes another as part of the orchestrated process. The control flow lives in ’s protocol, not in the participants. This is the defining distinction from choreography: in an orchestration, is implemented by ; in a choreography, is distributed across all participants.
-
Participant opacity: each is opaque to the other participants — knows only its own interface and ’s invocations; it does not know about for and does not know its position in the overall workflow. Participant opacity makes orchestrations substitutable: can be replaced by any service implementing the same interface without modifying any other participant — only ’s protocol needs updating.
Orchestration vs choreography
The orchestration/choreography distinction was formalized in the web services context ca. 2002–2004 (W3C Web Services Architecture, 2004; W3C Web Services Choreography Description Language, 2004):
Orchestration (imperative): a central process manages the overall workflow. invokes services, handles responses, manages state, and drives the process to completion. BPEL (WS-BPEL 2.0) is the standard orchestration language: a BPEL process is the orchestrator; the services it calls are participants.
Choreography (declarative): a decentralized protocol that each participant implements locally. There is no orchestrator; each participant knows its local protocol (what messages to send and receive, and when) and interacts directly with other participants. WS-CDL (Web Services Choreography Description Language) specifies choreographies as global interaction patterns from which local protocols can be derived.
The formal difference in terms of process algebra:
- Orchestration: where is an active process driving the as reactive services
- Choreography: where each is a process with a locally specified protocol; no exists as a separate entity
Milner: CCS and -calculus
Robin Milner’s process calculi provide the formal foundation for both orchestration and choreography:
CCS (A Calculus of Communicating Systems, 1980): processes communicate by synchronizing on shared channel names. is parallel composition; and synchronize on complementary actions and . An orchestration is a CCS process where sends on channel to which listens on .
The -calculus (A Calculus of Mobile Processes, Milner, Parrow, Walker 1992): extends CCS with name-passing — channel references can be sent as message payloads, enabling dynamic binding. An orchestrator can receive a channel reference to a participant at runtime, invoke it, and forward the result — modeling dynamic service orchestration where participants are discovered and bound at runtime. The -calculus’s scope extrusion rule ( when free in after extrusion) formalizes how new communication channels are shared between the orchestrator and new participants.
Bisimulation for orchestrations: two orchestration processes are equivalent iff they are bisimilar — no external observer (participant) can distinguish them. The labeled bisimulation in CCS/π-calculus gives the right equivalence: two orchestrations that produce the same observable behaviors (same invocations on participants, same responses handled) are bisimilar.
Honda, Carbone, and Yoshida: multiparty session types
Kohei Honda (Language Primitives and Type Discipline for Structured Communication-Based Programming, 1998, with Vasconcelos and Kubo), and Carbone, Honda, Yoshida (Structured Communication-Centred Programming for Web Services, 2008) developed multiparty session types as the formal type theory for choreographic protocols:
A global type specifies the communication protocol for participants :
- : sends a value of type to , then continues
- : selects label for , and continues
- : recursive protocol
Projection : the local type for participant extracted from global type — ’s view of the protocol:
The global type is projectable iff the merge operation is defined for all uninvolved participants. A well-typed process system satisfies global type iff each implements .
Key theorems (Honda, Yoshida & Carbone, JACM 63(1), 2016): well-typed multiparty session processes satisfy (i) subject reduction — type is preserved under reduction; (ii) progress — no deadlock; (iii) projection soundness — if is projectable and each participant implements its local type, the system is communication-safe.
The orchestration-choreography duality: every orchestrated process can be expressed as a choreographic global type, and every choreography can be compiled to an orchestrated implementation. The duality is formal: the orchestrator ’s protocol corresponds to one participant’s local type in the choreographic description; “rotating” which participant acts as the controller yields the orchestration from the choreography. Honda et al.’s key result: a choreographic global type can always be compiled to an executable orchestration (with a designated “orchestrating” participant implementing orchestrator).
Open questions
- Whether the orchestration/choreography duality is a formal categorical duality — whether orchestrations and choreographies are dual objects in some category of distributed process specifications, related by a duality functor, and whether the projection from choreography to orchestration (extracting the orchestrator’s local type) is this functor’s action.
- Whether the soundness conditions for orchestration (the orchestrator correctly handles all possible participant responses, including faults) and choreography (the global type projects correctly to all local types without communication mismatches) unify to a single correctness criterion in the π-calculus or session type setting.
- Whether multiparty session types have a sheaf-theoretic formulation — whether a global type is a global section of a presheaf over the history site (the protocol as consistent local data), and whether projection is the restriction map in the presheaf.
- Whether the BPEL compensation mechanism — reversing committed work when a fault occurs — has a categorical formulation as a monad (the compensation monad), where binding corresponds to recording compensation actions and the monad’s unit/multiplication handle normal and compensated execution.