"Micro-series Service 01" What is micro-services, cognitive thinking and micro services

Bo recently saw the teacher of "micro-services" course, emotionally, ready to do the next record and study notes, hoping to find some more thoughts methodology and guidelines on micro-service architecture.

 

 

Speaking micro-services, it is necessary to talk about two people, two men have a very profound impact on the definition of micro-services architecture, a Martin Fowler, a director of architecture is netflix Adrian Cockcroft, netflix service company for the entire micro-architecture from advancing the decisive role in the promotion. Martin Fowler said core which point several micro service defined in a blog post, where it set out.

 

 

Martin Fowler believes the first person micro-services architecture is an architectural style, this architectural style includes six features on the map

A small group of service

The original monolith services are operational capacity of the large and packaged in a single block, these micro-services claimed split monolithic services, a small formation of independent service. Here is the biggest feature is "small", so tangled smaller whom and to what extent was small, many students will tangle this small point, because this is not particularly small and clearly defined, so this will come out of now many DDD Domain driven design split to guide micro-services, but basically a micro service allows a developer to independently understand, basically it is called a micro-services, the specific number of lines of code is not very critical.

Independent process

Micro service is run in a separate process which, for example, java deployed in tomcat, can also be deployed in the container docker in itself is an easy process, so the service can be micro-way process to expand.

Lightweight communications

Advocates the use of micro-services to build lightweight communication mechanism, such as http, fixed message format and message format reduction, no coupling between services, so that communication lightweight as possible.

Based on the operational capacity

Micro-business service is based on the ability to build, for example, customer service, access to services, goods and services, based on these capabilities to build these micro-business services.

Independent deployment

Micro demolished after the service separately, each team maintains its own micro-services, development, iterative own micro-services, can be independent to deploy, especially between teams do not need to go coordination, business development and maintenance of these can to be more agile, lightweight and fast.

No centralized management

原来单体服务是需要整个技术团队是需要独立的架构团队去管理,统一架构,统一技术栈,统一存储,微服务就不太一样,微服务主张每个团队根据自己的技术需要,选择自己最熟悉,最高效解决问题的技术栈,甚至选择不同存储方式。

说到第二个人netflix架构总监 Adrian Cockcroft,他给微服务下了一个定义 : "Loosely Coupled service oriented architecture with bounded context"

  • 首先第一点:服务之间应该是松散耦合,不能对周边有强依赖,如果一个团队的开发对周边有强依赖性,则不能认为松散耦合
  • 其实第二点:服务面向的架构,微服务还是在本质上无法脱离SOA的理念,本身来说还是一种SOA,只是更加细化落地。
  • 第三点:有界上下文,每个团队可以维护自己的数据源,不是集中式的数据源,每个团队可以自己独立去演化自己的数据源,对业务的支持会更加敏捷

思考点:

微服务可以独立部署,独立部署给业务带来什么的好处? 微服务是基于有界上下文,每个团队是可以拥有自己独立的数据源,但在分布式系统中每个团队拥有了独立的数据源会带什么挑战?

Guess you like

Origin www.cnblogs.com/Agui520/p/11248612.html