Orchestration, Choreography, and Composition

一直对于服务组合的真正含义感到迷糊,查了一下这位老兄在yahoo group上面对于服务组合中两个常见的英文单词Orchestration和Choreography的理解,转来一用。

In a conversation with a colleague on process orchestration and composite services, he asked whether there were any good definitions that would accurately describe the relationship between them. In my brief google-hunt, I didn't really find any clear, concise definitions, and I also threw choreography into the mix as another term frequently used in similar contexts. I did find one whitepaper from someone at Oracle that characterized the difference between Orchestration and Choreography based upon whether a central controller (orchestrator) was used or not.

While the definitions may have been simple at one point, I think the contention around BPEL combined with the struggle of vendors to categorize the infrastructure in this space (EAI, MOM, ESB, BPM, Composite Development Environments, XML Gateways) have muddied the waters. For example, if I use a tool from the BPM space, such as microsoft BizTalk or Tibco BusinessWorks, to build a service which pulls data from three other services and returns some composition of the data, a very simple composite service, is that also a process orchestration?

I thought I'd turn this into a group exercise and see how all of you define it. Here are my thoughts (not so much a definition) to get us started.

Process orchestration involves a conscious effort to externalize the process from the underlying tasks that constitute the process. It should encompass both human and system tasks, and therefore, must support the notion of "wait" states in the orchestration (e.g. wait for human to do this, wait for JMS message). Orchestration can be delegated to subprocesses, meaning tooling must support the notion of process composition. This is a key component in supporting "wait" states, as processes always begin with a wait state. One way of implementing this would be to create separate orchestrations for each sub-process so that waits always occur at the beginning. If tooling doesn't support composition, however, the macro view of the true process will be lost.

Service composition is an effort to take the capabilities of two or more services and expose the combined capabilities as a more coarse- grained service. Typically, the act of composition will require some manipulation of the output of the constituent services which are performed by the composite service. While orchestration tools can also perform this, as typically a process maintains contextual information that is shared among the individual tasks, service composition does not represent a conscious effort to externalize the process itself. Therefore, the perceived overlap between orchestration and composition is more to due to shared capabilities of the tooling than a relationship between the two concepts.

Process choreography is similar to process orchestration in that it is concerned with the execution of a business process. The difference between them lies in the control over the execution. A choreographed approach can, at best, monitor the process execution, but not directly influence it, since there is no centralized controller. An orchestrated approach relies upon a centralized controller to execute the tasks associated with the project. An analogy is that of a symphony. An orchestrated approach requires a conductor to cue the individual musicians, keep time, etc. A choreographed approach would simply give each musician the sheet music, letting them rely solely on their own knowledge of when to play. External monitoring is available in both cases, i.e. the audience.

你可能感兴趣的:(Research)