简体   繁体   English

设计分布式顺序/并行业务流程

[英]design distributed sequential/parallel business process

Suppose this system: 假设这个系统:

input => service A => service B => service C & service D (both can be run parallel) => service E => output 输入=>服务A =>服务B =>服务C和服务D(均可并行运行)=>服务E =>输出

  • Each service must have horizontal scale up ability. 每个服务必须具有横向扩展能力。

How can I design this system using c# efficiently? 如何有效使用c#设计此系统? Services can be either asp.net web api or windows service. 服务可以是asp.net Web API或Windows服务。

There would be advantages to using message queuing for communicating between your services as it provides for async and fault-tolerant communication between them. 使用消息队列在服务之间进行通信将具有优势,因为它提供了服务之间的异步和容错通信。 Queued communication scales out well and enables parallel execution of activities very easily. 排队通信可以很好地扩展,并可以非常轻松地并行执行活动。

In terms of technology, you could use NServiceBus and the Particular Service Platform (full disclosure - I am the original creator of NServiceBus) or, if you're looking for something free then MassTransit could be a good choice. 在技​​术方面,您可以使用NServiceBus和特殊服务平台(完整披露-我是NServiceBus的原始创建者),或者,如果您正在寻找免费的东西,那么MassTransit可能是一个不错的选择。

If you're looking for a comparison between the two, see this SO question: 如果要在两者之间进行比较,请参见以下SO问题:

NServiceBus vs MassTransit NServiceBus对比MassTransit

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

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