Micro Services Architecture Case (01): Introduction to Project technology selection, architecture illustration

This article Source: GitHub · Click here || GitEE · Click here

First, the single architecture

Monomers architecture is more common in small to medium business, the scene mode is a single application, a single database. A package (such as war or format Jar format) containing all business requirements function, which is a more traditional architectural style.

Defects monomer architecture

  1. High complexity, the project module contains more dependent fuzzy, modify the program easy to trigger unknown problem.
  2. Scalability is limited, single use only whole extension, can not stretch for the characteristics of the service module.
  3. Poor stability, any small problem, could cause the entire application services directly hang.

Second, micro Services Architecture

Micro Services Architecture is an architectural concept, the core idea is to be managed by the decomposition of business functions and requirements of the various services, to achieve the overall decoupling of business. Create an application service around business models, application services can be developed independently, iteration deployment. The structure of the project is more clear.

Advantages and Disadvantages of Micro Service

  1. Single service corresponds to a single business function to facilitate the understanding, development, maintenance;
  2. Independent service deployment can be deployed to meet the scale of demand at the request of the amount of each service;
  3. Databases, services, architecture, business split and other more difficult, high technical competence requirements;

3. Introduction

Micro Services Architecture core of the case, based on several core components SpringCloud framework, Eureka registration and service discovery component, Feign declarative WebService client components, Zuul dynamic routing gateway components. Multiple data management, service management to build multiple, multiple middleware integration, multi-service mode split, etc., to build an integrated application case SpringCloud micro-services framework.

Core Module

  1. Business split architecture design
  2. More integrated middleware services
  3. The micro-code blocking service management
  4. Multiple MySQL Data Source Administrator

Fourth, technology selection

1, the core frame assembly

1. 基础层框架:Spring5+,SpringBoot2+,SpringCloud2+
2. 持久层框架:mybatis,mybatis-plus
3. 开发组件:Druid,Log4j,FastJson,JodaTime,JavaMail
4. 中间件集成:RocketMQ,Redis,Quart,ElasticSearch
5. 数据存储:MySQL、Redis、ElasticSearch

2, the code hierarchy

Micro Services Architecture Case (01): Introduction to Project technology selection, architecture illustration

V. Project architecture

1, architecture diagram

Micro Services Architecture Case (01): Introduction to Project technology selection, architecture illustration

2, architecture description

  • Client interface service
1. 用户端服务接口;
2. 管理端服务接口;
3. 数据入库服务接口;
4. 数据分析服务接口
  • Universal Service Interface
1. RocketMQ消息队列服务 ;
2. ElasticSearch搜索引擎服务 ;
3. Quart定时器服务 ;
4. Redis缓存服务 ;
5. 基础业务:Token认证服务 ;
6. 基础业务:MsgBox消息中心服务 ;
  • Micro Component Services
1. 路由网关:Zuul组件;
2. 服务注册与发现:Eureka组件;
3. 服务间调用组件:Feign组件;
  • Data storage containers
MySQL、Redis、ElasticSearch

Sixth, the source address

GitHub·地址
https://github.com/cicadasmile
GitEE·地址
https://gitee.com/cicadasmile

Micro Services Architecture Case (01): Introduction to Project technology selection, architecture illustration

Guess you like

Origin blog.51cto.com/14439672/2445275