Orchestration vs. Choreography

后端 未结 11 1493
逝去的感伤
逝去的感伤 2020-11-30 16:32

What are the differences between service orchestration and service choreography from an intra-organization point of view.

11条回答
  •  北荒
    北荒 (楼主)
    2020-11-30 17:03

    Since the thread is old but still writing to it for those who will stumbled here in search of this question as I did. This is much debated question in Service-oriented architecture (SOA) which needs much cleaner explanation for beginners.

    Orchestration: Executable Process

    • Used in private business processes
    • A central process (which can be another Web service) takes control of the involved Web services and coordinates the execution of different operations on the Web services involved in the operation
    • The involved Web services do not "know" (and do not need to know) that they are involved in a composition process and that they are taking part in a higher-level business process.
    • Only the central coordinator of the orchestration is aware of this goal, so the orchestration is centralized with explicit definitions of operations and the order of invocation of Web services.

    Choreography: Multi-party Collaboration

    • Choreography, in contrast, does not rely on a central coordinator. Rather, each Web service involved in the choreography knows exactly when to execute its operations and with whom to interact. Choreography is a collaborative effort focusing on the exchange of messages in public business processes.

    • All participants in the choreography need to be aware of the business process, operations to execute, messages to exchange, and the timing of message exchanges.

    Choreography vs. Orchestration

    • From the perspective of composing Web services to execute business processes, orchestration is a more flexible paradigm and has the following advantages over choreography:

    • The coordination of component processes is centrally managed by a known coordinator.

    • Web services can be incorporated without their being aware that they are taking part in a larger business process.

    • Alternative scenarios can be put in place in case faults occur.

提交回复
热议问题