One semester in high school, I joined a show choir. After two months, I decided that I had endured all of the step-chasse, step-ball-change, and “jazz hands” that I could stand! I don’t remember any of it now, but I do remember the importance of choreography and coordination among the various participants. What, pray tell, does this have to do with SOA? I’m glad you asked.
Like a well choreographed dance, successful service oriented solutions clearly define roles, responsibilities, and coordinated interaction. Some call it workflow, others choreography, others orchestration, still others talk in more general terms of coordination. There was a time when I thought all of this was a just a semantic game and there was no real difference. While a part of me still questions whether or not we REALLY need all of these different terms, concepts, and standards for the basic idea of ‘making sure everyone and everything does what she/he/it is supposed to’, I am beginning to appreciate the differences among these various concepts.
Orchestration (Executable Business Process)
As organizations mature in their adoption of SOA, they tend to migrate away from a focus upon individual services and toward a focus upon business processes. Orchestration enables an enterprise to fulfill a business process by pulling together a set of service operation calls along with workflow-style business logic and some process-specific variables to maintain persistent state throughout the process. Principally, this is achieved through Business Process Execution Language (BPEL) and a corresponding process engine. BPEL is championed by the likes of Microsoft, IBM, and Oracle (to name a few) and is maintained and actively developed by OASIS.
Choreography (Multi-party Collaboration)
Moving beyond the internal workings of a given organization’s services and orchestrated business processes, choreography is concerned with facilitating the interactions that occur between enterprises. Choreography relates to describing collaboration interfaces between parties. The dominant standard in this space is the W3C’s Web Service Choreography (WS-CDL), a language designed to describe multi-party contracts.
Coordination (Multi-party Context Sharing)
The term ‘coordination’ within the SOA / WS space is far less well understood than either orchestration or choreography. Much of the literature and vendor documentation out there will describe choreography and coordination as being synonymous. This is not quite accurate. To make matters more confusing, the W3C has a Web Services Coordination group. Their job is to coordinate all of the others groups in the WS domain. So what does ‘coordination’ actually mean in the SOA / WS context? It’s really all about sharing context between WS entities, typically to support the prorogation of transaction semantics. OASIS has done a tremendous amount of work in this area under the Web Services Composite Applications Framework (WS-CAF) umbrella. That framework consists of the Web Service Context (WS-CTX), Web Service Coordination Framework (WS-CF), and Web Services Transaction Management (WS-TXM) standards.
Orchestration vs Choreography vs Coordination
So what’s the story here? Are these various workflow-type concepts and corresponding technology standards truly distinct elements that merit unique treatment, or just an example of over-engineering? Although my heart longs for simplicity and clarity in this arena, I do think that there is some value in breaking these notions apart. This is especially true for enterprises that engage in complex, service oriented B2B interactions (typically financial and insurance companies).
Orchestration expresses organization-specific business logic. The entire flow is owned and governed by the organization, even if the flow requires interaction with third parties. Choreography is more collaborative and peer-to-peer in nature, with no central organizing entity. Coordination is a supporting player that can be used in concert with an orchestration or choreography.
So when do you choose one over the other?
- Use orchestration to automate and service orient individual, executable business processes
- Use choreography to describe contractual service interactions between various parties
- Use coordination to define the hand-off of application and business context between various parties
If you’d like to read more on the subject, I recommend the following:
Any thoughts, questions, or war stories to share regarding orchestration, choreography, or similar concepts in SOA?