In front of the word

Earlier this year, I put together a technical book called “Spring Cloud Advances in Microservices Architecture.” Today officially began the pre-sale, the beginning of the year to now just ten months, it is not easy. Write this post about some non-technical trivia about writing a book.

The reason

Writing this book was a bit of a coincidence, and in the last year I’ve been contacted by a couple of editors at a publishing house, via email, on my blog. Maybe because microservices have been really hot these days, the editors suggested I write a book about them. At that time, I did not care about it (editors are also casting a wide net, and can not seriously think that their level has reached). More importantly, I feel that my writing style is very poor, and my technology is just like that, so I am not interested at all. However, it is a good habit to keep blogging, especially if the original content is more valuable. My blog is not well known, but by spreading it through the public account, I was able to get some feedback, which gradually boosted my confidence (probably already inflated). By the end of last year, I felt I could go deeper into technology, so I chose Spring Cloud, a popular composite framework for microservices architecture, as the subject of this book and decided to try my hand at writing a book.

About the content

I was an early follower of Spring Cloud, and have been practicing and applying it in projects since then. Spring Cloud is much better than it was when it first came out, and has become more powerful by integrating existing open source frameworks with some of the components developed by the Spring community itself. Spring Cloud is relatively simple to use and integrate individual components, but microservices practice requires a deeper understanding of these basic components. In daily application, I will understand and learn the realization principle of each component, although NOT particularly detailed, but also familiar with the main part.

In fact, there are books about this aspect, such as DIDI’s Spring Cloud micro-service practical battle and Zhou Li’s Spring Cloud and Docker micro-service architecture combat, which were written earlier and the content quality is quite high. However, the development and iteration of the technology has been rapid. The Spring Cloud version has been replaced by Finchley, and the Spring Boot version is 2.x (2.x is based on Spring 5). Relatively speaking, the implementation and usage of many components have changed a lot. Based on the latest Finchley, this book provides a detailed introduction to the main Spring Cloud components involved in the microservice architecture, as well as a case study of basic applications. This book is suitable for all Java developers, especially those engaged in microservices development and architecture.

cooperation

The book is written by three authors, the other two being @Randy and @Cangwu, both of whom are excellent, and can be explained by purchasing this book (hard Wide, HH).

Writing a book is quite time-consuming and energy consuming. When I decided to do this, I knew that it would be difficult to finish it and write it well by myself because of many factors (ability, time, etc.). The power of teamwork is strong, so I invited two other excellent students, and we began to work together to finish the manuscript and learn from each other’s strengths. The technical book as a whole is not very difficult to write, with each functional component leading to the introduction of implementation principles according to the basic application case. In this process, some details are worth in-depth understanding, deepened some of their own understanding, but also learned a lot.

In fact, the first draft of the book was completed at the end of May, and then the authors reviewed each other and invited several industry leaders to help review it. The editor also proposed many suggestions for revision, and it took more than a month to revise it back and forth. I am also waiting for the release of Finchley. When I started writing it, it was still the Milestone version. What is painful is that there will be a lot of changes from the Milestone version to the release version. Such as filters, route assertions, and partial refactoring in the Spring Cloud Gateway. So when the official version came out, the three authors spent a lot of time comparing the previous implementation differences and correcting some problems in time. The final draft was finalized at the end of July. Editor Wu Yi also stepped up the follow-up work such as revision and typesetting after the final draft. Thank you very much.

directory

The book has 13 chapters and 428 pages in paper form. Introduce the contents of this book:

  • Chapter 1 Introduction to microservice architecture
    • 1.1 The emergence of microservices
      • 1.1.1 Monomer Application
      • 1.1.2 SOA Architecture 1.1.3 Microservices Architecture
    • 1.2 Genres of microservices architecture
      • 1.2.1 ZeroC IceGrid
      • 1.2.2 Based on message queues
      • 1.2.3 Docker Swarm
      • 1. Spring Cloud
    • 1.3 Cloud native and microservices
      • 1.3.1 cloud native
      • 1.3.2 The Twelve Factors
      • 1.3.3 container,
      • 1.3.4 the conversation
      • 1.3.5 Microservices-oriented
    • 1.4 Summary of this chapter
  • Chapter 2 Introduction to Spring Cloud
    • 2.1 Overview of Spring Cloud
      • 2.1.1 Version Description
      • 2.1.2 Composition of Spring Cloud
    • 2.2 Spring Cloud features
      • 2.2.1 Spring Cloud Context
      • 2.2.2 Spring Cloud Commons: Public abstraction
    • 2.3 Summary of this chapter
  • Chapter 3 The foundation of Spring Cloud :Spring Boot
    • 3.1 Introduction to Spring Boot
      • 3.1.1 Spring Boot 2.0
      • 3.1.2 Spring Boot and Spring Cloud
    • 3.2 Spring Boot Core Features
    • 3.3 Building a microservice
      • 3.3.1 IDEA generation
      • 3.3.2 rainfall distribution on 10-12 initial generated
    • 3.4 Spring Boot Configuration File
      • 3.4.1 Default Configuration file
      • 3.4.2 Externalizing configuration
      • Rule 3.4.3 YAML
      • 3.4.4 Automatic loading of external attributes into beans
      • 3.4.5 more profile
      • 3.4.6 Starters
      • 3.4.7 Make a Starter
      • 3.4.8 physical
    • 3.5 Summary of this chapter
  • Chapter 4 service Registration and Discovery :Eureka
    • 4.1 Basic Applications
      • 4.4.1 Eureka profile
      • 4.1.2 Establish Eureka Service Registry
      • 4.1.3 Setting up Eureka service provider
      • 4.1.4 Setting up Eureka service caller
      • 4.1.5 Eureka Service registration and discovery
      • Simple application of Consul
    • 4.2 Principles of Service Discovery
      • 4.2.1 Core Architecture Diagram
    • 4.3 Eureka Client source code analysis
      • 4.3.1 Reading Application Configuration Information
      • 4.3.2 Discovering clients
      • 4.3.3 Pulling registry Information
      • 4.3.4 Service Registration
      • 4.3.5 Initializing a Scheduled Task
      • 4.3.6 Services Go Offline
    • 4.4 Parsing Eureka Server source code
      • 4.4.1 Service Instance Registry
      • 4.4.2 Service Registration
      • 4.4.3 Receiving Service Heartbeat Messages
      • 4.4.4 Service elimination
      • 4.4.5 Services Go Offline
      • 4.4.6 Cluster Synchronization
      • 4.4.7 Registry Pull
      • 4.5.8 Self-protection
    • 4.5 Advanced applications
      • 4.5.1 Metadata of Eureka Instance and Client
      • 4.5.2 Port Settings for the Status page and Health Check Page
      • 4.5.3 Region and Zone
      • 4.5.4 Ha Registry
    • 4.6 Summary of this chapter
  • Chapter 5 Declarative Restful Web Client :Spring Cloud OpenFeign
    • 5.1 Basic Applications
      • 5.1.1 Interaction between microservices
      • 5.1.2 OpenFeign profile
      • 5.1.3 Code examples
    • 5.2 Source Code Analysis
      • 5.2.1 Core Components and Concepts
      • 5.2.2 Dynamically registering BeanDefinition
      • 5.2.3 Instance Initialization
      • 5.2.4 Function Calls and Network Requests
    • 5.3 Advanced Applications
      • 5.3.1 Customization of Decoder and Encoder
      • 5.3.2 Request/response compression
    • 5.4 Summary of this chapter
  • Chapter 6 Circuit breaker :Hystrix
    • 6.1 Basic Applications
      • 6.1.1 RestTemplate Hystrix
      • 6.1.2 Hystrix and Feign
    • 6.2 Hystrix principle
      • 6.2.1 Service avalanche
      • 6.2.2 circuit breaker
      • 6.2.3 Service Degradation
      • 6.2.4 Resource Isolation
      • 6.2.5 Hystrix Implementation Roadmap
    • 6.3 Source Code Parsing
      • 6.3.1 encapsulation HystrixCommand
      • 6.3.2 HystrixCommand Class Structure
      • 6.3.3 Asynchronous Callback Executing commands
      • 6.3.4 Executing Commands asynchronously and Synchronously
      • 6.3.5 Circuit Breaker Logic
      • 6.3.6 Resource Isolation
      • 6.3.7 Monitoring Request Timeout
      • 6.3.8 Rollback Logic Failed
    • 6.4 Advanced applications
      • 6.4.1 Core Configuration Description
      • 6.4.2 Asynchronous and Asynchronous Callback Executing commands
      • 6.4.3 inheritance HystrixCommand
      • 6.4.4 Requesting a Merge
      • 6.4.5 Hystrix Dashboard
    • 6.5 Summary of this chapter
  • Chapter 7 Client Load Balancer :Spring Cloud Netflix Ribbon
    • 7.1 Load Balancing
    • 7.2 Basic Applications
    • 7.3 Source Code Analysis
      • 7.3.1 Configuration and Instance Initialization
      • 7.3.2 Integration with OpenFeign
      • 7.3.3 LoadBalancer LoadBalancerClient
      • Sections 7.3.4 ILoadBalancer
      • 7.3.5 Load Balancing Policy Implementation
    • 7.4 Advanced Applications
      • 7.4.1 Ribbon API
      • 7.4.2 Sending Network Requests using Netty
      • 7.4.3 Load balancing of read-only Databases
    • 7.5 Chapter Summary
  • Chapter 8 API Gateway :Spring Cloud Gateway
    • 8.1 Introduction to Spring Cloud Gateway
    • 8.2 Basic Applications
      • 8.2.1 User Services
      • 8.2.2 Gateway Service
      • 8.2.3 Client Access
    • 8.3 Source Code Parsing
      • 8.3.1 Initial Configuration
      • 8.3.2 Gateway Processor
      • 8.3.3 Route Definition locator
      • 8.3.4 Route Locator
      • 8.3.5 Route Assertion
      • 8.3.6 Gateway Filter
      • 8.3.7 Global Filters
      • 8.3.8 API endpoint
    • 8.4 Application progression
      • 8.4.1 Traffic Limiting Mechanism
      • 8.4.2 Fuse downgrade
      • 8.4.3 Gateway Retry Filter
    • 8.5 Summary of this chapter
  • Chapter 9 Configuration Center :Spring Cloud Config
    • 9.1 Basic Applications
      • 9.1.1 Configuring the Client
      • 9.1.2 Configuring the Warehouse
      • 9.1.3 the service side
      • 9.1.4 Configuration Verification
      • 9.1.5 Configuring Dynamic Update
    • 9.2 Source Code Parsing
      • 9.2.1 Configuring the Server
      • 9.2.2 Configuring the Client
    • 9.3 Advanced Application
      • 9.3.1 Configuring multiple REPOs for config Server
      • 9.3.2 The Client Overwrites configuration properties of the remote End
      • 9.3.3 Attribute Override
      • 9.3.4 Security Protection
      • 9.3.5 Encryption and Decryption
      • 9.3.6 Quick Response Failure and Retry Mechanism
    • 9.4 Chapter Summary
  • Chapter 10 Message Drivers :Spring Cloud Stream
    • 10.1 Message Queue
      • 10.1.1 Common Components of message queues
    • 10.2 Basic Applications
      • 10.2.1 Declare and bind Channels
      • 10.2.2 User-defined Channels
      • 10.2.3 Receiving Messages
      • 10.2.4 configuration
    • 10.3 Source Code Analysis
      • 10.3.1 Dynamically Registering BeanDefinition
      • 10.3.2 Binding services
      • 10.3.3 Obtaining a binder
      • 10.3.4 binding Producer
      • 10.3.5 Message Sending Process
      • 10.3.6 StreamListener annotation handling
      • 10.3.7 binding Consumer
      • 10.3.8 Receiving Messages
    • 10.4 Advanced Applications
      • 10.4.1 Binder For RocketMQ
      • 10.4.2 multi-instance
      • 10.4.3 partition
    • 10.5 Summary of this chapter
  • Chapter 11 message Bus :Spring Cloud Bus
    • 11.1 Basic Applications
      • 11.1.1 Configuring the Server config-server
      • 11.1.2 Configuring the Client config-client
      • 11.1.3 Verification
    • 11.2 Source Code Parsing
      • 11.2.1 Event definition and event listeners
      • 11.2.2 Subscribing and publishing messages
      • 11.2.3 Control endpoints
    • 11.3 Application Progression
      • 11.3.1 Registering events in a customized package
      • 11.3.2 Customizing Listeners
      • 11.3.3 Initiator of an event
    • 11.4 Summary of this chapter
  • Chapter 12 Authentication and Authorization :Spring Cloud Security
    • 12.1 Basic Applications
      • 12.1.1 OAuth2 Introduction 12.1.2 JWT
      • 12.1.3 Setting up an Authorization Server
      • 12.1.4 Configuring a Resource Server
      • 12.1.5 Accessing Restricted Resources
    • 12.2 Overall Architecture
      • 12.2.1 Overview of Spring Security Architecture
      • 12.2.2 Overview of Spring Security OAuth2 Architecture
      • Security and OAuth2 in 12.2.3 Spring Cloud Security
    • 12.3 Source Code Parsing
      • 12.3.1 SecurityContext SecurityContext
      • 12.3.2 Authentication certificate
      • 12.3.3 Authorization Authorization
      • Filters and interceptors in 12.3.4 Spring Security
      • 12.3.5 Authorization Server
      • 12.3.6 Resource Server
      • 12.3.7 Token Relay Mechanism
    • 12.4 Advanced Applications
      • 12.4.1 Spring Sercurity Customization
      • 12.4.2 OAuth2 Customization
      • 12.4.3 SSO SSO
    • 12.5 Summary of this chapter
  • Chapter 13 Service Link Tracing :Spring Cloud Sleuth
    • 13.1 Introduction to Link Monitoring Components
      • 13.1.1 Common Monitoring Components
      • 13.1.2 Basic Concepts
    • 13.2 Basic Applications
      • 13.2.1 features
      • 13.2.2 Project Preparation
      • 13.2.3 Spring Cloud Sleuth independent implementation
      • 13.2.4 integration Zipkin
    • 13.3 Summary of this chapter

The last

Finally, I want to say that it is not easy to write a book. Please support the legal version. Author level is limited, if you have questions and doubts welcome to correct.

Book matching source address:Github.com/Advanced-Sp…

Spring Cloud Advanced Micro Service ArchitectureItem.jd.com/12453340.ht…

Subscribe to the latest articles, welcome to follow my official account