编程知识 cdmana.com

Spring cloud building distributed Cloud Architecture microservices

1. swan Cloud Frame selection - swan Cloud brief introduction

swan Cloud Using large Internet distributed enterprise microservice Cloud Architecture ( swan Cloud Distributed microservice cloud ), The cloud framework is based on Spring Cloud To encapsulate , It's an ordered set of frames . utilize Spring Boot The development model simplifies the development of distributed system infrastructure , Such as service discovery 、 register 、 Configuration center 、 The message bus 、 Load balancing 、 Circuit breaker 、 Data monitoring, etc. ( There is only a simple list of ), Both can be used. Spring Boot The development style of one-click startup and deployment . Swan cloud Cloud Will be more mature now 、 A combination of service frameworks that stand the test of time , adopt Spring Boot Style is repackaged , It shields the complicated configuration and implementation principle , Finally, a set of simple and easy to understand 、 Easy to deploy and easy to maintain distributed system architecture platform .

Adopt the service-oriented component development mode , It can realize complex business functions . Provide driven development mode , Integrate the built-in code generator , take JavaEE Improve development efficiency 5 More than times , Reduce 50% The amount of code development , solve 80% The repetitive work of , Let developers pay more attention to business logic . Use Maven Carry out project construction management , use Jenkins Continuous integration , It is mainly located in the architecture of large-scale distributed enterprise system or large-scale distributed Internet products .

2. Honghu Technology Architecture

swan Cloud Distributed microservice cloud combines the common requirements of most enterprises , The selection of technology is quite strict 、 harsh , Not only with the most popular technology in the industry , We should also be in line with international standards , In the future 5~10 Not within the year out. For the company's technology selection, we should have a global perspective , Not only to give the company a good choice of Technology , And respond quickly to the business needs of the enterprise , Be able to quickly customize business for enterprises .

swan Cloud Using large Internet distributed enterprise microservice Cloud Architecture ( Swan cloud ), The architecture is as follows :

3. swan Cloud form

Large enterprises distributed micro service cloud architecture service components to achieve modularization 、 Micro service 、 Atomization 、 Grayscale Publishing 、 Continuous integration , The components are as follows :

commonservice eureka

Cloud service discovery , One is based on REST Service for , For location services , To realize service discovery and failover in the cloud middle tier

commonservice config

Configuration management toolkit , Allows you to put the configuration on a remote server , Centralized management cluster configuration , Local storage is currently supported 、Git as well as Subversion.

Spring Cloud Bus

event 、 The message bus , For clustering ( for example , Configuration change events ) Medium propagation state change , But with Spring Cloud Config Joint hot deployment .

Hystrix

Fuse , Fault tolerant management tools , It aims to control the nodes of the service and the third-party library through the fuse mechanism , Thus, it can provide more powerful fault tolerance for delay and fault .

Feign

Feign It's declarative 、 templated HTTP client .

Spring Cloud Task

Provide cloud plan task management 、 Task scheduling .

Ribbon

Provide cloud load balancing , There are many load balancing strategies to choose from , It can be used with service discovery and circuit breakers .

Turbine

Turbine It is a tool for aggregation server to send event flow data , It is used to monitor hystrix Of metrics situation .

Zuul

Zuul It is to provide dynamic routing on the cloud platform , monitor , elastic , A framework for edge services such as security .Zuul It's equivalent to equipment and Netflix The application of flow Web The back end of the site is the front door for all requests .

Spring Cloud Security

be based on spring security Security kit for , Add security controls to your app .

commonservice sso

by Web、 mobile phone 、PC Provide unified login 、 authentication 、 Authorized entrance , The third-party system is allowed to access the service information stored by users in Honghu cloud business under the premise of user authorization .

commonservice apigateway

API The gateway encapsulates the internal architecture of the system , Provide a custom one for each client API. Like authentication 、 monitor 、 Load balancing 、 cache 、 management 、 Static response processing .

commonservice zipkin

Log collection kit , Encapsulates the Dapper and log-based Tracking and Zipkin and HTrace operation , by SpringCloud The application realizes a distributed tracing solution .

commonservice turbine

Aggregation server is a tool for sending event stream data , It is used to monitor hystrix Of metrics situation ..

commonservice cache

Independent distributed cache service .

commonservice admin

Microservice monitoring , Such as Health、 Memory 、JVM、 Garbage collection 、 Various configuration information ( For example, data source 、 Cache list and hit ratio ) etc. , Modifiable logger Of level etc. .

commonservice-system

Provide basic functions of background management , These include : user , role , jurisdiction , The data dictionary , menu , department , Institutions , The operation log , Connection pool monitoring, etc

4. The code structure

5. Background management platform - Technical point ( Only the basic part is listed )

SOA Service Framework :Spring Cloud 、Spring Boot、RestFul etc.

Distributed cache :Redis

Modular management :Maven

Database connection pool :Alibaba Druid

The core framework :Spring framework、Spring Boot

Persistence layer frame :MyBatis

Security framework :Apache Shiro

Server side validation :Hibernate Validator

Task scheduling :quartz

Log management :SLF4J 1.7、Log4j

Client authentication :JQuery Validation

Dynamic tab :easyui tab

The front frame :Bootstrap、Vue

6. Background management platform - Functional structure diagram

7. Basic function list and description

User management : The user is the system operator , This function mainly completes the system user configuration .

Role management : Role menu permission assignment 、 Set roles to divide data scope permissions by organization .

Rights management : The system often used in some of the more fixed data maintenance and so on .

Menu management : Configure system menu , Operating authority , Button authority identification, etc .

Department of management : Configuration system organization , Tree structure display , You can adjust your superiors and subordinates at will .

Log management : System operation log record and query ; System exception information logging and query .

Connection pool monitoring : Monitor database connection pool status , analysis SQL Identify system performance bottlenecks .

8. Background management platform - Basic function screenshot


 

 

 

 

 

 

 

 
( Enterprise architecture source code can be added ball : Thirty five three six two four seven two fifty nine )

9. Design of micro service layer of Honghu cloud platform

10. swan Cloud The future of

swan Cloud Provide distributed infrastructure solutions for future Internet enterprises . meanwhile , With the recent years of microservice architecture and Docker The concept of container is very popular , Will also let Spring Cloud Standardized... Is provided in future Vietnamese solutions 、 Whole station technical solution , Effectively promote the technical level of the server software system .

版权声明
本文为[Black Knight 1203]所创,转载请带上原文链接,感谢

Scroll to Top