编排微服务 - Orchestrating microservices

10/14 14:15
阅读数 0

问题:

What is the standard pattern of orchestrating microservices?编排微服务的标准模式是什么?

If a microservice only knows about its own domain, but there is a flow of data that requires that multiple services interact in some manner, what's the way to go about it?如果一个微服务只知道它自己的领域,但是有一个数据流需要多个服务以某种方式交互,那么有什么办法呢?

Let's say we have something like this:假设我们有这样的事情:

  • Invoicing开票
  • Shipment运输

And for the sake of the argument, let's say that once an order has been shipped, the invoice should be created.为了论证起见,假设订单发货后,应创建发票。

Somewhere, someone presses a button in a GUI , "I'm done, let's do this!"在某个地方,有人在GUI按下了一个按钮,“我完成了,让我们这样做吧!” In a classic monolith service architecture, I'd say that there is either an ESB handling this, or the Shipment service has knowledge of the invoice service and just calls that.在经典的单体服务架构中,我会说要么有一个ESB处理这个问题,要么 Shipment 服务知道发票服务并调用它。

But what is the way people deal with this in this brave new world of microservices?但是,在这个美丽的微服务新世界中,人们是如何处理这个问题的呢?

I do get that this could be considered highly opinion-based.我确实知道这可以被认为是高度基于意见的。 but there is a concrete side to it, as microservices are not supposed to do the above.但它有一个具体的方面,因为微服务不应该做上述事情。 So there has to be a "what should it by definition do instead", which is not opinion-based.所以必须有一个“根据定义它应该做什么”,这不是基于意见的。

Shoot.射击。


解决方案:

参考一: https://en.stackoom.com/question/1yAoE
参考二: https://stackoom.com/question/1yAoE
展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部