微服务 简介

/ 2020-08-01 / 738人浏览 / 0人评论

什么是微服务?

根据 Martin Fowler 对于微服务的的一些概述,我们可以简单的概括出以下几个微服务的特点:
1、一个应用应该是由一组微小的服务组成;
2、微服务之间可以通过http 进行通讯;
3、每个微小的服务都是可以独立运行、独立部署的;

the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies.

微服务与SOA

首先什么SOA? 面向服务的架构(SOA)是一个组件模型,它将应用程序的不同功能单元(称为服务)进行拆分,并通过这些服务之间定义良好的接口和协议联系起来。接口是采用中立的方式进行定义的,它应该独立于实现服务的硬件平台、操作系统和编程语言。这使得构件在各种各样的系统中的服务可以以一种统一和通用的方式进行交互。
那么微服务和SOA之间的联系是什么?
Martin Fowler 也是说过 “ 可以把 SOA 看作微服务的超集 ”,反过来说就是微服务是SOA的子集

Martin Fowler
https://martinfowler.com/articles/microservices.html#footnote-fine-grained

 

 

全部评论