微服务与SOA有所不同 [英] Microservice vs SOA differs

查看:98
本文介绍了微服务与SOA有所不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找SOA和微服务架构风格之间的差异 并找到了一个很好的链接 https://www.infoq.com/articles/boot-microservices

I was looking for differences b/w SOA and Microservices architecture style and found a good link https://www.infoq.com/articles/boot-microservices

说:
作为面向服务的体系结构"(SOA)的继承者,微服务可以归入同一类分布式系统"中,并继承了许多与SOA相同的概念和实践.但是,它们的区别在于对单个服务的责任范围.在SOA中,服务可能负责处理各种功能和数据域,而微服务的一般准则是它负责管理单个数据域及其周围的相应功能域.

It Says:
As a successor to "Service Oriented Architecture" (SOA), microservices can be categorized in the same family of "distributed systems", and carry forward many of the same concepts and practices of SOA. Where they differ, however, is in terms of the scope of responsibility given to an individual service. In SOA, a service may be responsible for handling a wide range of functionality and data domains, while a general guideline for a microservice is that it is responsible for managing a single data domain and the corresponding functions around that domain.

请帮助我理解:
单个数据域的含义(建议用于微服务). 是说必须构建一个单独的微服务来管理单个域/实体(以及与该单个域/实体相关联/复合的域/实体).由于这种情况,即使要实现基本功能(企业)应用程序,也将有许多(〜20到〜50)个微服务

Please help me to understand :
The meaning of single data domain (recommended for microservice). is it saying that a separate Microservice has to be build to manage a single domain/entity (and associated/composite domain/entities with this single domain/entity). Becasue if this case, then there will be many(~20 to ~50) microservices even to implement a basic functionality (enterprise) application

我已经通过链接微服务架构与SOA之间的区别,但是它解释了,这在前两个原则上是相同的,而在第三点上是不同的(在SOA中,服务共享模式和协定,而不是类),但这是SOAP协定,但是与SOA(使用REST)的黑白区别是什么?与微服务(主要是REST)

I have gone through the link Difference between Microservices Architecture and SOA, but it explains, that it is same on the first two tenets, and different on 3rd point (in SOA, Services share schema and contract, not class), but that is SOAP contracts, but then what is the difference b/w SOA (with REST) vs Microservices (which is mostly with REST)

推荐答案

Sean所说的话,当许多公司开始使用SOA时,微服务就是人们开始称呼的API.域驱动设计的兴起也导致该术语的使用增加.在目前的行业中,两者之间绝对没有区别,人们称其为合适".

Adding to what Sean had said, microservices are what people started to call APIs when SOA had started to being put to use in many companies. The rise of Domain-driven design has also led to the increase in usage of the term. In the industry right now, there is absolutely no difference between the two, people call it as they seem fit.

当您说遵循原则时,您将获得许多微服务,这是对的.在我看来,无论是SOA还是微服务,对独立服务的抽象应仅取决于用例,如何部署服务以及有多少团队并行处理这些服务.如果跨主机部署服务,网络带宽的成本也会增加(尽管容器和DC/OS框架现在正在解决此问题).如果它是快速变化的服务,具有很多活动部件,那么将大型服务分解为微服务将是有意义的.否则,我会避免过早的优化,并将功能打包到单个(或几个大型)服务中.

You are right when you said that you will end up with many micro-services when you follow the philosophy in principle. In my opinion, be it SOA or microservices, abstraction to independent services should depend only on the use-case, how the services are going to be deployed and how many teams are going to work on those in parallel. There is also an increasing cost to network bandwidth if the services are deployed across hosts (though containers and DC/OS frameworks are solving this problem now). If it is fast-changing service, having lots of moving parts, then breaking down a big service into microservices would make sense. Otherwise I would avoid premature optimisation and have the functionality packaged into a single (or a few big) services.

这篇关于微服务与SOA有所不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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