Orchestration, Choreography, and Composition

本文探讨了服务组合中的Orchestration和Choreography概念,分析了两者之间的区别与联系,并通过具体场景进行了解释。

一直对于服务组合的真正含义感到迷糊,查了一下这位老兄在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.

参考资源链接:[IBM BPMN教程:新手入门指南](https://wenku.youkuaiyun.com/doc/500gxuxb8b?utm_source=wenku_answer2doc_content) 《IBM BPMN教程:新手入门指南》是一份宝贵的资源,特别适合希望深入了解BPMN以及如何在企业流程建模中区分OrchestrationChoreography概念的初学者。教程清晰地解释了这两种方法论,以及它们在企业流程设计中的应用。 在业务流程建模中,Orchestration(流程编排)通常指的是单个实体(如系统或部门)对整个业务流程的控制和协调。这种模式下,流程的执行顺序和路径是由一个中心化实体所定义和管理的。例如,一个订单处理系统,其中所有活动和决策均由该系统统一指挥。 相对地,Choreography(流程协作)涉及多个独立实体间的交互和同步。在这种模式下,流程没有单一的控制中心,而是通过各参与方之间的协调和通讯来推动流程进展。这通常适用于更为动态和复杂的业务环境,比如供应链管理,其中不同组织或部门需要共享信息和资源以共同完成业务目标。 为了更深入地理解这两者的区别,并能在实际案例中有效应用,教程中包含了具体的业务流程案例分析。通过这些案例,你可以学习如何在不同情境下选择和应用OrchestrationChoreography方法论。例如,教程可能通过一个制造业的供应链管理案例,展示如何使用BPMN进行流程编排,以控制订单从接收至交付的整个流程;而另一个案例可能描述一个涉及多个供应商协作生产的产品开发流程,展示如何通过Choreography来实现流程协作。 要真正掌握这些概念,最好的实践方式是在WebSphere或类似的BPM平台中实际操作,使用BPMN符号绘制流程图,并尝试不同的建模方法。通过这种方式,你可以更好地理解OrchestrationChoreography在实际业务流程中的应用,并在面对复杂流程时作出更加明智的决策。 总之,通过《IBM BPMN教程:新手入门指南》学习OrchestrationChoreography的区别,并结合实际案例分析,将为你提供坚实的理论基础,并增强你在实际项目中应用BPMN进行流程建模的能力。 参考资源链接:[IBM BPMN教程:新手入门指南](https://wenku.youkuaiyun.com/doc/500gxuxb8b?utm_source=wenku_answer2doc_content)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值