Twenty years of IT migrant workers finally shared the actual documentation of the SpringCloud microservice architecture, which is too strong!

Preface

More and more companies use SpringCloud to implement microservice architecture design. We can see such a phenomenon: Whether it is new development or system refactoring, everyone seems to be scrambling to use microservices. For a Java developer, learning about microservices is of great benefit.

20 years of IT migrant workers share the actual documentation of SpringCloud microservice architecture

 

This article will introduce how to develop a large-scale e-commerce platform from three levels of architecture design, program development, and operation and maintenance deployment. It is hoped that everyone can learn what they want to learn, and continuously improve their technical depth and breadth. Hope to be liked by everyone! !

table of Contents

20 years of IT migrant workers share the actual documentation of SpringCloud microservice architecture

 

main content

Chapter 1 Microservice Architecture and Spring Cloud; This chapter introduces the ins and outs of microservice architecture, and explains the design and development based on microservices, which has been recognized by more and more companies and individuals, and microservice architecture is the mainstream Technology has also developed rapidly.

SpringCloud, because of its rich tool suite, comprehensive design, and good compatibility, makes it a development tool that many developers like and love, so it will also become popular in a wider range.

Therefore, as a Java developer, learning and mastering the development methods of Spring Cloud is not only a "fashion", it is more likely to become an excellent housekeeping skill.

Friends, let us work hard together and learn Spring Cloud together!

20 years of IT migrant workers share the actual documentation of SpringCloud microservice architecture

 

Chapter 2 High Concurrency Microservice Architecture Design; The microservice architecture design style itself is a high concurrency mechanism. Relying on the cloud service environment, we can provide the basic resources used by microservices into a scalable, high-concurrency, and highly available environment through automated infrastructure construction. At the same time, through the use of Spring Cloud tool suite and third-party libraries, the high scalability of microservices is fully guaranteed. No matter what kind of architecture design, the stability, robustness and reliability of the system are indispensable.

20 years of IT migrant workers share the actual documentation of SpringCloud microservice architecture

 

Chapter 3 Large-scale e-commerce platform design examples; this chapter uses the method of micro-service architecture design to build a large-scale e-commerce service application platform. This platform is basically composed of two parts: RESTAPI microservices that provide interface services and WebUI microservices that provide human-computer interaction operation interfaces. On this basis, merchant management backends, operator management backends, and mobile mall front desks are built.

In the following chapters, we will introduce in detail the development methods of each example project, as well as the demonstration of the use of related microservice applications.

20 years of IT migrant workers share the actual documentation of SpringCloud microservice architecture

 

Chapter 4 Development Environment Preparation; In this chapter, we have done some preparations and instructions for the development environment for Spring Cloud development, and created the pring Cloud project using IDEA development tools. Although this project is very simple, it is enough as a guide for getting started. In subsequent chapters, I will add more complex design and development to this project.

20 years of IT migrant workers share the actual documentation of SpringCloud microservice architecture

 

Chapter 5 Microservice Governance; this chapter first describes the creation of the registry, as well as the registration and configuration of services. Then, based on the registration process, through the implementation of functions such as health monitoring, service alarms, circuit breaker dashboards, and link tracking, it is explained how to effectively monitor microservices. At the same time, combined with the use of the log analysis platform, all running microservice applications are comprehensively and effectively processed.

Subsequent development and implementation of microservices will be carried out on the basis of this microservice governance environment, and references and configurations related to service governance will not be specifically explained

20 years of IT migrant workers share the actual documentation of SpringCloud microservice architecture

 

Chapter 6 Category Management Microservice Development; This chapter introduces the development examples of two microservices, the category management interface of the e-commerce platform and the Web category management backend. Through the development and demonstration of this project, we have a clear understanding of the relationship between the microservices Fast communication and mutual calling methods. In the category management interface development, we learned about the working principle and implementation method of the DDD development method in the Spring development framework through the Spring Data JPA development tool. Through the realization of the category management interface, we transform the stateful data access behavior into a stateless interface service.

In the next chapter, we will introduce another database development tool MyBa, and experience the application methods of different database development tools in Spring project engineering.

20 years of IT migrant workers share the actual documentation of SpringCloud microservice architecture

 

Chapter 7 Inventory Management and Distributed File System; This chapter introduces the microservice interface of inventory management and the development of a related Web application microservice. In the development process of this project, we used the semi-automatic database development framework MyBatis and experienced different development practices from using JPA. In production applications, readers can choose to use according to actual conditions.

At the same time, the web application development in this chapter also demonstrates the method of using distributed file system. Whether it is using DFS or oss, the design ideas and implementation methods are basically the same, so we only need to master one development method to be able to Freely in application.

20 years of IT migrant workers share the actual documentation of SpringCloud microservice architecture

 

Chapter 8 Mass Order System Microservice Development; In this chapter, we use MongoDB to develop an order system that can support massive data, and use Spring5's reactive programming design to implement a highly concurrent microservice order interface that supports non-blocking asynchronous calls, so This is a high-performance order microservice application system. Regarding reactive programming design, due to its asynchronous call characteristics, it can only support database design without transaction management. For microservice design, it is a distributed application in itself, so the design of transaction management can only be implemented using distributed transaction management. In the transaction management instance caused by the change of order status in this chapter, we use the message queue to realize the design of final consistency of data in distributed transaction management.

20 years of IT migrant workers share the actual documentation of SpringCloud microservice architecture

 

Chapter 9: Design and development of mobile mall; this chapter uses the various interface services designed in the previous chapters to design and develop a mobile mall. In this design, the calling method of the microservice interface is demonstrated, and at the same time, the HS single-page design practice is carried out for mobile devices. Throughout the development process, readers can more deeply realize that the interface calls between microservices are very convenient. Using the pringCloud tool suite to develop mobile applications is also light and pleasant.

20 years of IT migrant workers share the actual documentation of SpringCloud microservice architecture

 

Chapter 10 Merchant management background and SSO design; this chapter constructs a safe and reliable merchant management background through the merchant authority system and sso design. In the merchant management background, merchant users can use any other microservice applications that have been connected to sso in a distributed environment through unified authority management. The back-end design of the merchant management uses a more complete way to combine the dispersedly developed microservice applications into a functionally rich whole, which fully embodies the powerful advantages of the microservice architecture design.

Among them, the merchant authority system is designed to establish a three-level menu system based on access to resources, and through the relationship between roles and resources, the user authority and menu form an organic whole.

The role of the merchant and the management configuration of its menu must be operated by the platform operator. In the development of the platform management background in Chapter 11, the function of managing the authority configuration of the merchant will be realized.

20 years of IT migrant workers share the actual documentation of SpringCloud microservice architecture

 

Chapter 11: Platform management background and merchant menu resource management; this chapter mainly implements the functions of platform management background access control design, merchant registration and permissions, and menu configuration and management. Among them, merchant registration, its permissions, and menu configuration and management are all realized by calling ST API microservices of merchant services. In fact, in our microservice architecture design, the development of Web microservices is realized by calling the RestAPI microservices. When the various service functions of the e-commerce platform need to be managed in the platform management background, they can all be called Various microservice interfaces are implemented.

The development of microservices has come to an end. Starting from Chapter 12, we will discuss the deployment of microservices and the construction of microservice operating environments from the perspective of operation and maintenance.

20 years of IT migrant workers share the actual documentation of SpringCloud microservice architecture

 

Chapter 12 Cloud Service Environment and Docker Deployment Tool; This chapter introduces the establishment of microservice application release environment and the management method of application deployment based on Docker management tool. From the perspective of cloud service environment formation and application deployment methods, we can have many choices, provided that the security and reliability of the microservice operating environment must be ensured, and then a practical deployment tool can be selected according to the scale of the system platform. Generally speaking, for a small system, use the docker-compose tool; if it is a large system platform, it is recommended to use the ubemetes management tool.

20 years of IT migrant workers share the actual documentation of SpringCloud microservice architecture

 

Chapter 13: Building a Scalable Distributed Database Cluster; This chapter introduces a simple way to install MySQL in CentOS, and uses a master-slave design to build a distributed database cluster, and build a high-performance and scalable database cluster system. At the same time, the design of high-availability clusters is realized by using grouping. In the database access design, the OneProxy middleware is used to implement a configurable read-write separation call method, and combined with the sub-database sub-table function to improve the database access efficiency. Finally, the use of dual-machine hot standby design provides a more secure and reliable powerful guarantee for the use of database agent middleware and its clusters.

Through the introduction of database cluster design in this chapter, readers can deeply understand the working principle of database cluster. If you use a cloud service database, it is recommended to use a distributed database provided by the cloud service provider, which can make the cost-effectiveness higher.

20 years of IT migrant workers share the actual documentation of SpringCloud microservice architecture

 

Chapter 14: Building a Highly Available Distributed File System; this chapter uses the open source FastDFS to build a highly available distributed file system, and sets up a load balancing service for file access through Nginx, thus providing a high performance for microservice applications File server.

After the installation is completed and the test is normal, the link address of the distributed file system can be configured in the inventory management project, and the microservices can be used for joint debugging with the distributed file system.

20 years of IT migrant workers share the actual documentation of SpringCloud microservice architecture

 

Chapter 15 uses Jenkins to realize automated construction; this chapter introduces how to use the automated construction tool Jenkins to design continuous delivery workflows, and demonstrates the implementation process of automatic deployment with a simple example. In this example, we use Git for code pull, Maven for program packaging, and Docker for image creation and application update and deployment. From this example, we can see the powerful scalability of Jenkins.

Through the study of this chapter, I believe that readers can build a complete automation infrastructure according to the actual situation, so as to realize the automated construction process of integration testing and continuous deployment in microservice release.

20 years of IT migrant workers share the actual documentation of SpringCloud microservice architecture

 

This [SpringCloud Microservice Architecture Practical Combat] document has a total of 330 pages. Friends who need the full version can forward this article and follow the editor, scan the code below to get it! !

to sum up

This article not only introduces in detail how to use the Spring Cloud tool suite for the development of microservice applications, but also introduces how to use it in conjunction with ConsulDocker Kubemetes Jenkins, etc. to publish the developed microservice applications in a scalable manner on the cloud.

Through the systematic study of this article, readers can quickly apply the knowledge they have mastered to actual work and improve their professional competitiveness

The readers of this article are the majority of Java developers, system architects and system operation and maintenance personnel. This article is especially suitable for readers who have used the Spring open source framework or have a certain basic knowledge of the Spring framework.

Guess you like

Origin blog.csdn.net/bjmashibing001/article/details/110409998