微服务:什么是智能终端和哑管道? [英] Microservices: What are smart endpoints and dumb pipes?

查看:6468
本文介绍了微服务:什么是智能终端和哑管道?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾经看过一篇文章<一个href=\"http://martinfowler.com/articles/microservices.html#SmartEndpointsAndDumbPipes\">Microservices\"由Martin Fowler,并发现它很难理解的智能端点哑管道。请解释这些条款,例子是值得欢迎的。

I have read an article "Microservices" by Martin Fowler and find it difficult to understand smart endpoints and dumb pipes. Please explain these terms, examples are welcome.

推荐答案

我没看过的文章,所以我只能猜测他可能意味着什么,但他给ESB作为对微服务和ZeroMQ作为一个例子例如,对于微服务,我希望我的猜测将pretty确切的:

I didn’t read the article, so I can only speculate what he can mean exactly, but as he gives ESB as an example against microservices and ZeroMQ as an example for micro services I hope my speculation will be pretty exact:

一个UNIX(和Linux)的想法是建立独立的小应用程序,并将它们通过管道连接。两个命令我使用它的可能是最常见的集 PS 的grep 是这样的:的ps aux | grep的PROCESS_NAME - 在这里你可以看到一个哑管道而 PS 的唯一转发输出的标准输入的grep

One of the ideas of Unix (and Linux) is to build small independent applications and connect them via pipes. The probably most common set of two command which I’m using is ps and greplike this: ps aux | grep PROCESS_NAME - here you can see a dumb pipe which only forwards the output of ps to stdin of grep.

其他邮件系统的工作同样,虽然他们可以有更多的有点像循环赛分布和可靠的交付的复杂性。二郎作为一种语言是建立在小聪明端点发送彼此之间的消息之上。这里的优点是显而易见的,在文章中也提到了,小应用程序更易于维护,解耦使得它更容易按比例

Other messaging systems like ZeroMQ work similarly, although they can have a little bit more complexity like round-robin distribution and reliable delivery. Erlang as a language is built on top of small smart endpoints sending messages between each other. The advantages here are obvious and also mentioned in the article, small applications are easier to maintain, decoupling makes it easier to scale.

在微服务的另一方面是最常用的大企业应用,如所提到的企业服务总线。我真的不与那些足以给你一个具体的例子工作,但通常这些总线含有大量的这要么是通过脚本或配置包括功能。这种功能主要包括具有先进的路由选择的工作流程configureable,甚至可以改变的消息,所以不同的端点能够处理它们。

On the other hand of Microservices are most commonly big enterprise applications, like the mentioned Enterprise Service Bus. I didn’t really work with those enough to give you a specific example, but generally those busses contain a lot of functionality which is either included via scripts or configuration. Such functionality mostly includes a configureable Workflow with advanced routing and can even transform the messages, so different endpoints can handle them.

一个例子可能是 - 如果你想执行一个系统中的一些进步的行动,例如改变一个已经运行的项目的需求,这可能会启动工作流,其中ESB将围绕发出自动不同的通​​知不同的演员这些改变的要求,并等待1个或更多的行动者确认将应用于此更改之前。这将是基本上是相反的 - 哑终端(这只是发送/接收数据到/从总线)和一个非常智能管道(公交车,可以配置或脚本来处理所有可能的企业场景)

An example could be - if you want the perform some advance action in a system, for instance change the requirements in an already running project, this could start a workflow, where the ESB would send out automatically different notifications to different actors around those changed requirements and wait for 1 or more of those actors to confirm before this change would be applied. Which would be basically the opposite - dumb endpoints (which just send/receive the data to/from the bus) and a very smart pipe (the bus, which can be configured or scripted to handle all possible enterprise scenarios).

我是pretty相信存在有处理类似场景的企业服务总线,而这些都是简单的哑ZeroMQ般的消息传递框架的相反。

I’m pretty confident that there exist enterprise service busses which are handling similar scenarios and those are the opposite of simple "dumb" ZeroMQ-like message passing frameworks.

基本上逻辑在某处被执行 - 无论是在大的ESB,或者在端点。微服务的想法是把它变成终点,而不是到总线,并具有类似的理念为UNIX应用程序。

Basically the logic has to be implemented somewhere - either in the big ESB, or in the endpoints. The idea of microservices is to put it into the endpoints rather than into the bus and have a similar philosophy as unix applications.

这篇关于微服务:什么是智能终端和哑管道?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆