本文介绍了微服务架构与SOA之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在阅读微服务架构,我试图看到它与常规SOA之间的区别(除了单独部署的服务之外)。任何人都可以告诉我这个差异,也许是微服务架构的专业人员和公司?

解决方案

我想你可以想到微型服务架构作为SOA专业化的风格。不要忘记,之一是所有SOA真的是四个句子:




  • 边界是明确的

  • 服务是自主的

  • 服务共享模式和合同,而不是类

  • 服务兼容性基于策略






这将带给我们,来自Lewis / Fowler:



开发单个应用程序作为一套小型服务的一种方法,每个
在自己的进程中运行并与轻量级$
机制,通常是HTTP资源API。这些服务是围绕业务功能构建的
,并且可以通过完全
自动部署机器独立部署。对这些服务的集中式
进行了最低限度的集中管理,可以使用不同的
编程语言编写并使用不同的数据存储技术。


从这个定义可以看出,微服务至少达到了前两个原则(其实就是第二个原则),但是它们是否满足第三个要求(我不太了解原则4)所以我不会评论)。



第三个原则可能不适用于微服务的原因是微服务的一个特点是它们通常暴露在一个RESTful API上,根据Fowler的看法,根本不会暴露合同和模式(超过正常的HTTP语言),

微服务风格偏离SOA的另一种方式是使用这个处方:

From this definition, it's clear that microservices fulfil at least the first two tenets (with a real emphasis on the second), but it's questionable whether they fulfil the third (I don't really understand tenet 4 so I won't comment).

The reason the third tenet may not hold for microservices is that one of the characteristics of microservices is that they are generally exposed over a RESTful API, which, one could argue, does not expose contract and schema at all (over and above the regular HTTP verbiage), as we see from Fowler:

Another way in which a microservices style deviates from SOA is with this prescription:

Following the original tenets of SOA does not prevent me from manually copying my service binaries into my production environment, but with the microservices approach, the service deployment and management should be fully automated.

这篇关于微服务架构与SOA之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-27 02:05