简体   繁体   English

什么是SOA中的微服务

[英]What's exactly a microservice in SOA

I've been trying to get my head around some SOA principles and I came across this page which describes a microservice in SOA: 我一直试图了解一些SOA原则,并且偶然发现了描述SOA中微服务的本页:

http://soapatterns.org/design_patterns/micro_task_abstraction http://soapatterns.org/design_patterns/micro_task_abstraction

Solution: Individual units of non-agnostic logic with specialized processing and deployment requirements are separated using the microservice model and abstracted into a microservice layer in which there is the architectural freedom to tailor environments in support of specialized service processing and deployment requirements. 解决方案:使用微服务模型将具有特殊处理和部署需求的非不可知逻辑的各个单元分离,并抽象到微服务层中,在该微服务层中,架构自由地定制环境以支持特殊服务处理和部署需求。

What are exactly these specialized processing and deployment requirements? 这些专门的处理和部署要求到底是什么?

And what's the key difference between a microservice and a taskservice in SOA? SOA中的微服务和任务服务之间的主要区别是什么? as they both appear to me none-agnostic and can be composited of other entity and utility services. 因为它们在我看来都是不可知论的,并且可以与其他实体和公用事业服务组合在一起。

Service Oriented Achitecture (SOA) deals with defining services, design of what the services are meant to do, their interface , governance, service lifecycle, operational SLA's and "usage agreements" (these last two lead to a number of non-functional requirements), among others. 面向Achitecture(SOA)服务与定义的服务, 什么样的服务是为了做设计,它们的接口 ,治理,服务生命周期,运营SLA和“使用协议”(最后这两个导致一些非功能性需求)酒店预订等等。

Microservices can be considered more of a development and deployment approach. 可以将微服务视为一种开发和部署方法。 If SOA is defined correctly (your interfaces are clean, designed with appropriate granularity, loosely coupled), it is easier for you to apply a microservices approach, subject to your technical platform. 如果正确定义了SOA(您的接口是干净的,采用适当的粒度设计,松散耦合),则根据技术平台,您可以更轻松地应用微服务方法。 Once you have defined a service, your implementation considerations would include infrastructure, application servers, build and deployment mechanisms. 定义服务后,您的实现注意事项将包括基础结构,应用程序服务器,构建和部署机制。 A key defining feature of a microservice deployment model is that as much of the "stack" is self-contained within a single deployable unit (can be referred to as a container ). 微服务部署模型的关键定义特征是,尽可能多的“堆栈”是独立包含在单个可部署单元 (可以称为容器 )中的。

Using a Java example, at the very least a microservice might be one service or function (exposed as Rest or SOAP) running in its own standalone JVM (bundled libraries, application/web server) which you can refer to as a container ( example here ). 使用Java示例,至少微服务可能是在自己的独立JVM(捆绑的库,应用程序/ Web服务器)中运行的一项服务或功能(暴露为Rest或SOAP),您可以将其称为容器( 此处示例) )。 Contrast this with a more "traditional" approach where you might have one team managing the application server on which you might deploy multiple services or functions. 与“传统”方法相比,您可以让一个团队来管理应用程序服务器,在该服务器上可以部署多个服务或功能。 The major benefit is you can avoid conflicting dependencies, your environment is fully in your control (effectively a few lines of code) and your service might perform more predictably as it has no interference from other services contending for the same resources (JVM threads, Data sources to name a few). 主要好处是您可以避免相互冲突的依赖关系,您的环境完全在您的控制之中(有效地是几行代码),并且您的服务可能具有更可预测的性能,因为它不受竞争相同资源的其他服务(JVM线程,数据)的干扰资料来源)。

Specialised container management tools such as docker and associated scripting allow you to put together any required configuration you need from your environment. 专用的容器管理工具(例如docker)和关联的脚本使您可以将环境中所需的任何必需配置组合在一起。


Update 16/Jan/2018 Also note this paragraph on the distinction between SOA and Microservices as concepts. Update 16 / Jan / 2018还请注意本段中关于SOA和微服务作为概念的区别 I translate it as: People didn't do SOA right so needed a new buzzword. 我将其翻译为:人们没有正确执行SOA,因此需要一个新的流行词。 True to an extent. 在一定程度上是正确的。 However, you could also see the two as complementary concepts - SOA being more design heavy while microservices being a more deployment focused methodology. 但是,您也可以将两者视为互补的概念-SOA的设计更加繁重,而微服务则更注重于部署。

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

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