Writing in the front


In this era of everything connected, more and more people and things become nodes on the Internet, constantly expanding the boundaries of the Internet. Nodes are value, and more nodes mean more value. So how to carry more nodes becomes the primary problem that IT practitioners solve. This book explains the popular Dubbox+SpringBoottDocker micro-service architecture solution around the application scenario of seckill. The main contents include the introduction of microservice architecture, the principle and application of Dubbox, the use of SpringBoot to realize microservice, the use of ActiveMQ+Redis to carry high concurrent traffic, the use of ActiveMQ to realize distributed transactions, and the third-party access under distributed conditions.

Micro-services Architecture: Dubbo+SpringBoot+Docker

Chapter 1: Architecture design.

This chapter explains the application scenarios of seckill in detail and makes an in-depth analysis of the application scenarios. Through business analysis, the corresponding business-level solution and system-level solution are put forward, and the key points and difficulties of technology stack are planned. Finally, the business architecture, application architecture, technical architecture and deployment architecture of the “Double 11” shopping project are planned based on the actual business of the flash sale.

Chapter 2: Microservices Architecture.

Starting from the development of the industry, the most popular micro-service architecture in Internet enterprise applications is introduced by listing common software architecture patterns in the development of the industry. This paper makes an in-depth discussion on the micro-service architecture, and splits the application of “Double 11” shopping project based on the micro-service architecture.

Chapter 3: Docker environment construction.

This chapter starts from the actual operation of Docker and explains the operation principle of Docker, including Docker images, containers and visualization tools. Finally, the “Double 11” purchase project is taken as an example to quickly build the Docker environment needed for the project development.

Chapter 4: Initial Spring Boot experience.

This chapter first introduces the definition and functions of SpringBoot, and then explains the principles and practical details of SpringBoot through the construction and use of the SpringBoot framework.

Chapter 5: Use Dubbox+Spring Boot to build microservice architecture.

This chapter first introduces the related concepts of Dubbox, builds the operating environment of Dubbox, and implements a simple example of provider-consumer microservice architecture based on Dubbox+Spring Boot. Finally, based on Dubbox+SpringBoot, the micro-service architecture of “Double 11” shopping project was built.

Chapter 6: High concurrent access based on Redis+ ActiveMQ.

This chapter covers three parts: distributed locks, message queuing applications, and distributed transactions. Firstly, the concept of distributed lock is introduced based on the actual development of “Double 11” project, and the concept of message queue is put forward based on system performance optimization. Finally, the concept of message queue and distributed lock is combined to realize the shopping business and distributed transaction in high concurrency environment.

Chapter 7: Distributed third-party access.

This chapter includes three parts: wechat login, wechat Pay and Alipay Payment. The practical explanation method is adopted to deepen readers’ understanding of the principle.

Chapter 8: High-concurrency testing.

This chapter first introduces the concepts of high concurrency and common high concurrency testing software. It focuses on the installation, configuration, operation and report generation of JMeter. Through the concurrent test report, it verifies and effectively ensures the key business realization of the project under the concurrent operation of buying up.