简体   繁体   English

编排是ESB的责任吗?

[英]Is orchestration an ESB responsibility?

Is an Enterprise Service Bus (a tool that acts as a mediator, a message broker, a service enabler, schema transformation enhancer, transparent location provider, service aggregator, load balancer, monitor, and all that stuff) responsible to orchestrate services ? 企业服务总线 (充当调解器,消息代理,服务启用器,架构转换增强器,透明位置提供程序,服务聚合器,负载平衡器,监视器以及所有这些东西的工具)是否负责协调服务

What about putting an automated business business process with more than thousand steps and dozens of service invocations inside your enterprise service bus? 如何在企业服务总线中放置超过一千步和几十个服务调用的自动化业务流程?

Would you do it, or would you use a specialist in orchestration such as a BPEL engine? 你会这样做,还是会使用编排专家如BPEL引擎?

Please gimme you opinion. 请给你意见。

Yes and no. 是的,不是。 There's a thin, and sometimes indistinguishable line between orchestration and aggregation/service augmentation. 编排和聚合/服务扩充之间存在一条薄薄的,有时难以区分的界限。

In general, if you've got any long-running or complex business process (process being the key word, although I'm going to avoid defining it) - that's best suited to BPEL. 一般来说,如果你有任何长期运行或复杂的业务流程(流程是关键词,虽然我将避免定义它) - 这最适合BPEL。

Simple tasks, such as aggregating the results of three service calls, could and often should be done in an ESB layer. 简单的任务(例如聚合三个服务调用的结果)可以并且通常应该在ESB层中完成。

It's not worth losing too much sleep over, though 但是,不值得失去太多的睡眠

Disclaimer: I am an IBM ESB consultant, although I'm not writing this in an official capacity. 免责声明:我是IBM ESB顾问,虽然我不是以官方身份撰写的。

No, an ESB's responsibility is not the orchestration of services (per se). 不,ESB的责任不在于服务的编排(本身)。 The ESB provides a layer of abstraction at the "software infrastructure level". ESB在“软件基础架构级别”提供了一层抽象。

This means that an ESB is a "single logical abstract port of call for connectivity" with any service that is published on the bus. 这意味着ESB是与公共汽车上发布的任何服务的“单一逻辑抽象连接调用端口”。

The ESB being abstract, means that consumers of services on the bus, don't "need to know" deployment details of the service, and it is possible to expose "internally facing services" with a single document model. ESB是抽象的,意味着总线上的服务的消费者不“需要知道”服务的部署细节,并且可以用单个文档模型公开“面向内部的服务”。 The ESB provides low level services (such as protocol translation and message transformation), so that internally services can communicate in a simplified fashion. ESB提供低级服务(例如协议转换和消息转换),以便内部服务可以以简化的方式进行通信。

This implies some orchestration: The ESB provides orchestration of the afore mentioned low level services (eg when service X is called via IIOP, translate this to SOAP with Attachments. Then transform the request from whatever serialized data to an XML payload). 这意味着一些编排:ESB提供上述低级服务的编排(例如,当通过IIOP调用服务X时,将其转换为带附件的SOAP。然后将请求从任何序列化数据转换为XML有效负载)。

The orchestration you would typically avoid in an ESB is: In order to process this (insurance) sale, we first need to validate the information provided by the buyer, then we need to underwrite the risk of insuring, and finally calculate the premium that needs to be paid for the insurance, after which we need to… etc. 您在ESB中通常会避免的编排是:为了处理此(保险)销售,我们首先需要验证买方提供的信息,然后我们需要承保保险风险,并最终计算需要的保费支付保险费,之后我们需要...等

The steps described above are clearly a business process (which could even be interrupted… eg if automatic underwriting is not possible, then a human underwriter needs to further assess the risk). 上述步骤显然是一个业务流程(甚至可能被中断......例如,如果无法自动承保,那么人类承保人需要进一步评估风险)。

Business Services (eg Validation, Underwriting, Premium Calculation) that make up a Business Process (eg Insurance Sale), which is what is typically referred to as Orchestration, is best suited to happen in a Business Process Engine and defined using a formalized Business Process Modeling Language (such as BPEL). 构成业务流程(例如保险销售)的业务服务(例如,验证,承保,保费计算),通常称为业务流程,最适合在业务流程引擎中发生并使用正式的业务流程定义建模语言(例如BPEL)。

Also making a guess about the many steps in your process: In the above example, Validation is a (course grained) service. 还要猜测过程中的许多步骤:在上面的示例中,验证是一种(课程粒度)服务。 The validation rules themselves are internal to that service. 验证规则本身是该服务的内部规则。 For complex business rules (ie not business process), the use of a Business Rules Engine may be required. 对于复杂的业务规则(即非业务流程),可能需要使用业务规则引擎。

My short quick answer is NO, that not its responsability. 我的简短快速回答是否定的,不是它的责任。

I would rather let that to the BPEL or a BPM suite. 我宁愿把它放到BPEL或BPM套件中。

Mhh I don't know what else to add :) ... Good luck? 嗯我不知道还有什么要补充:) ...祝你好运?

Now my own vision. 现在我自己的愿景。

Regarding all the work an ESB has to do, putting service orchestration inside the main infrastructure element of your SOA is not a good idea. 关于ESB必须完成的所有工作,将服务编排放在SOA的主要基础结构元素中并不是一个好主意。

Aggregate, ok! 聚合,好的! But keeping your communication channel busy with business logic will, for sure, cause a terrible impact in the ability to delivery other features. 但是,保持沟通渠道忙于业务逻辑肯定会对提供其他功能的能力造成严重影响。

After all, most ESBs such as as BEA Aqualogic Service have a limited support for orchestration including lack of stateful capabilities, and activities like wait (a timer) or pick (wait for some input to move on the process), split/join capabilities (already added on ALSB 3.0), and so on. 毕竟, 大多数ESB (如BEA Aqualogic Service) 对编排的支持有限,包括缺乏有状态功能,以及等待(计时器)或选择(等待一些输入移动进程),分割/连接功能等活动(已添加到ALSB 3.0),依此类推。

No way. 没门。 Just use tools like a BPEL engine or a tool like Weblogic Integration. 只需使用BPEL引擎等工具或Weblogic Integration等工具即可。

Thanks. 谢谢。

Whenever you have two or more services that interact use service orchestrator, ie for composition and process control services. 每当您有两个或多个交互使用服务协调器的服务时,即组合和过程控制服务。 If you have esb expose this composition service on esb. 如果你有esb在esb上公开这个组合服务。 Now if you have to compose new service that includes this composition service use orchestrator and again expose on esb. 现在,如果你必须编写包含此组合服务的新服务,请使用orchestrator并再次在esb上公开。 Use esb as service delivery mechanism and web service broker and proxy. 使用esb作为服务交付机制和Web服务代理和代理。 In composing a service orchestrator will use esb to reach interacting services. 在编写服务时,orchestrator将使用esb来访问交互服务。 If these interacting services use incompatible xml schemas esb can transform/map them to common schema in runtime and route service requests based on the content, eg namespace. 如果这些交互服务使用不兼容的xml模式,esb可以在运行时将它们转换/映射到公共模式,并根据内容路由服务请求,例如命名空间。

Yes orchestration is a responsibility, in most cases, of the ESB. 是的,编排在大多数情况下是ESB的责任。 Or, alternatively, if you draw a line between ESB infra and orchestration infra, then you are doing so on a physical level for performance reasons, not for logical attribution of responsibility. 或者,如果您在下面的ESB infra和编排之间绘制一条线,那么出于性能原因,您在物理层面上这样做,而不是为了责任的逻辑归属。

You have 2 choices - when, for example, an HR system receives a new employee - where do you place the business logic that says "the compliance department will need to approve and check first, and then if that's ok, the HR department will need to finalise the hire, then the accounting department will need a new entry, and then the payroll system will need updating, and if that fails, then we'll need to send an email to HR"? 您有两个选择 - 例如,当人力资源系统接收新员工时 - 您在哪里放置“合规部门需要先批准和检查的业务逻辑”,然后如果可以,人力资源部门将需要最终确定雇用,然后会计部门将需要一个新的条目,然后薪资系统将需要更新,如果失败,那么我们将需要发送电子邮件给人力资源“? If all business processes are considered 'owned' by the initiating dept/application, then the overall system that is the enterprise becomes complex, with disparate orchestration systems. 如果所有业务流程都被初始部门/应用程序视为“拥有”,则整个系统即企业变得复杂,具有不同的编排系统。

The second choice is centralise the orchestration, essentially making it a logical partner of the messaging platform. 第二种选择是集中编排,实质上使其成为消息传递平台的逻辑合作伙伴。 If you choose to see these as separate artifacts, that is up to you, but it is equally valid to described both as ESB. 如果您选择将这些视为单独的工件,则由您自己决定,但将它们描述为ESB同样有效。

An Enterprise Service Bus should never be responsible for orchestrating services. 企业服务总线永远不应负责编排服务。

Orchestration implies a minimum of "smarts", specifically the ability to compensate for failed transactions. 业务流程意味着最少的“智能”,特别是补偿失败的交易的能力。 Service bus tools will often say they offer "try-catch" or something like that but the ability to run scoped componsation is the mark of a proper orchestration tool. 服务总线工具通常会说它们提供“try-catch”或类似的东西,但运行范围组合的能力是正确的编排工具的标志。 Additionally the ability to wait, know its own state, or keep things in suspense is another indicator that you're dealing with an orchestrator and not a bus. 此外,等待,了解自己的状态或保持悬念的能力是另一个指标,表明你正在与一个协调者而不是一个总线打交道。

Speaking to 1000+ steps plus dozens of services, consider the if-then's in the process. 说到1000多个步骤加上数十个服务,请考虑过程中的if-then。 If all the if-then statements in your 1000 steps speak only to routing with no change to the payloads then you're still in "routing" and therefore still in ESB. 如果1000步中的所有if-then语句仅说明路由而没有更改有效负载,那么您仍处于“路由”状态,因此仍处于ESB中。 But if there's even one nested if-then and I start to look for different tools. 但如果甚至有一个嵌套 if-then,我开始寻找不同的工具。 Aside, if-thens that look like routing can very quickly impact business logic. 此外,看起来像路由的if-thens可以非常快地影响业务逻辑。 Once business logic starts showing up then a better language such as BPEL or BPMN is better. 一旦业务逻辑开始出现,那么更好的语言,如BPEL或BPMN。

The example of an orchestra conductor is often given to describe how orchestration works, a central individual directing the musicians according to a score. 管弦乐队指挥的例子通常用于描述编排是如何工作的,一个中心个人根据乐谱指导音乐家。 Often what's left off is the idea that the conductor is not only directing, but listening as well, and if something goes wrong can compensate in a reliable, repeatable way. 通常情况下,导体不仅指导,而且还要聆听,如果出现问题,可以以可靠,可重复的方式进行补偿。

For instance imagine our first conductor goes to bring in the tuba player but said tuba player has decided to go do something else. 比如想象一下,我们的第一个指挥家会带来大号球员,但是说大号球员决定去做别的事。 A simple pinball-style "orchestrator" will bring in the tuba section, knowing full well it isn't there, and then wait for the audience to complain later. 一个简单的弹球式“协调器”将带来大号部分,完全知道它不存在,然后等待观众后来抱怨。 A really savvy conductor would see the tuba gone, and immediately bring up the deeper baritone horns to compensate. 一个真正精明的指挥家会看到大号走了,并立即调出更深的男中音喇叭来补偿。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM