How can you deliver software faster and deliver new features to users on a weekly, daily, or even hourly basis? How can new employees deploy code as soon as they come on board? How do you maintain quality at such a fast pace? Fast, our main challenge in app development, the faster we deliver, the more closely we can gather user feedback, and the more effectively we can meet user needs.

Microservices, DevOps, and cloud computing are the industry’s three big weapons for “fast” challenges, but none of them are easy to play with. Microservices, while bringing benefits, introduce a great deal of complexity; DevOps not only requires changes in team culture, organizational structure, and r&d process, but also puts new demands on application development. New technologies like virtual machines, containers, and images need to be learned. Can we leap-over the cloud stack quickly?

Spring Cloud will help us bridge the gap between app development and microservices, DevOps, and Cloud computing, making it easy for us to embrace microservices on the Cloud, but do you know how it does it? Do you have a thorough understanding of it? Do you know how to use it correctly? New concepts and technologies are constantly coming out of the clouds. Do you want to clear the clouds and get a clearer picture of them? Take a look. Through this series of articles, you will know the following:

  • Microservices, DevOps, cloud computing
  • Design principles of Spring Boot
  • What common suites Spring Boot integrates with
  • Spring Cloud micro services family bucket
  • How does Spring Cloud support DevOps
  • How does Spring Cloud fit into Cloud infrastructure
  • Spring Cloud fill-in-the-blank application development mode

1. The relationship between microservices, DevOps and cloud computing

As the speed of Internet refactoring continues to accelerate in all industries, what are the major new challenges facing our application development? Fast, the world martial arts only fast is not broken, the speed of application development is getting faster and faster. The faster the software development process runs, the faster the company can deliver software, the more closely it can collect user feedback, the more effectively it can meet user needs, build a better product, and thus build strong competitiveness, but:

  • How do you deliver new features to customers on a weekly, daily, or even hourly basis?
  • How do you get new employees to deploy code on day one or even during the interview?
  • After the code is deployed, how can you rest assured that your application is working properly?

These are the main challenges we face in app development, and microservices, DevOps, and cloud computing are the three key tools that the industry needs to address these challenges:

  • Microservices: The complexity and scale of Internet businesses are growing rapidly, and it is difficult for single applications to meet this development demand. Applications are decomposed into independent microservices, and each microservice can well complete a small task and divide the whole into parts. Each microservice can be developed with the most appropriate technology and language, created and managed by a small team, with low communication costs and rapid iteration.
  • The conversation: Micro service to solve the single application scale, slow speed of iteration, extension change difficult problems, improve the speed of application development, but the efficiency of the entire development process has yet to be promoted, the traditional function of matrix is not adapted to the development way, need to product for clues to break the barriers between different responsibility team, develop operational integration arises at the historic moment, Achieve continuous integration and continuous delivery.
  • Cloud computing: Microservices is about development, cloud is about runtime, DevOps is about bridging development and runtime. The volume of traffic of Internet services is massive, and there are peaks and trashes, which requires the application to be flexible and scalable, and also requires that basic resources can be created and destroyed automatically, thus leading to cloud computing technologies such as virtual machines and containers.

None of these three treasures are easy to play with, so let’s take a look at some of the problems or difficulties you’ll encounter in mastering them:

  • First, as application architectures evolve from “monolithic” to “microservices”, what difficulties do we encounter in embracing “microservices”? Every coin has two sides, and “microservices” is no exception, introducing some complexity as well as some benefits. Relative to the architecture of monomer type, the tiny segment iteration speed, deployment, frequency, system performance and system scalability, the respect such as technology stack diversity is better for fast delivery, but in the structure complexity, difficulty of deployment and operational difficulty, problem orientation, management cost and so on all have a lot of new challenges, how to foster strengths and circumvent weaknesses we truly embrace the “service”?
  • Third, DevOps, development operation and maintenance integration, on this basis to achieve more efficient continuous integration and continuous delivery. In addition to placing new demands on corporate culture, organizational structure, and process systems, DevOps also requires new changes in our application development. Is the application standardized enough? Is the deployment pipeline available? Is it possible to do one-click deployment and so on?
  • Finally, cloud computing, a whole new kind of IT infrastructure where we can use resources like computing, storage and networking in the same way we use water and electricity. Virtual machines, containers, images and other new technologies need to be familiar with and mastered. Can we all quickly leapfrog the cloud computing stack? Can our applications migrate to the cloud quickly? How to take full advantage of the features of cloud computing and make applications more resilient are new challenges that we will face and solve.

2. The relationship between Spring, Spring Boot, and Spring Cloud

Now that we have an initial understanding of what the problems are, let’s take a look at how Spring Cloud helps us address these challenges. What changes will it bring to application development? The development of our civilization is mainly manifested in the division of labor cooperation, just like water and electricity became infrastructure, we every household will not work with water and electricity, also accord with the tendency of the development of technology, cloud computing is to include some general, standard technology in infrastructure category, allows us to focus in the field of business, through collaboration to enhance the efficiency of delivery. Spring Cloud also follows the above rules and does a lot of auxiliary work for our application development from different dimensions, making application development easier.

Spring has existed as an application development framework for many years. With the continuous development and enrichment of JAVA development technology, the volume of Spring has become bigger and bigger, and the configuration and use of Spring has become more and more complex, especially the emergence of new technologies such as cloud computing and microservices. Spring Boot and Spring Cloud are here to stay, and new concepts can be confusing, so we need to clarify how they relate to each other:

2.1 the Spring

Spring Framework, an open source Java/Java EE full function stack application development Framework, contains the presentation layer, domain layer, data layer and other mainstream technical Framework:

1) Core Container

Spring-core: a Core utility class that is heavily used by other Spring modules; Spring-beans: Spring defines Bean support; Spring-context: runtime Spring container; Spring-context-support: Spring container integration Support for third-party packages; Spring-expression: Query and manipulate objects at run time using the Expression language;Copy the code

2) the AOP

Spring-aop: Proxy-based AOP support; Spring-aspects: AspectJ-based AOP support;Copy the code

3) Messaging

Spring-messaging: Support for Messaging architectures and protocols.Copy the code

4) Web

Spring-web: Provides basic Web integration capabilities, providing Spring containers in Web projects; Spring-webmvc: Provides servlet-based Spring MVC; Spring-websocket: provides the WebSocket function. Spring-webmvc-portlet: provides Portlet environment support;Copy the code

5) Data Access/Integration

Spring-jdbc: provides JDBC access to the database support; Spring-tx: provides programmatic and declarative transaction support; Spring-orm: provides support for object/relational mapping technologies; Spring-oxm: provides support for object /XML mapping technologies; Spring-jms: provides support for JMS;Copy the code

In addition, there is a huge ecosystem around the Spring Framework, Includes Spring Data, Spring Batch, Spring Security, Spring Integration, Spring AMQP, Spring Mobile, Spring for Android, and Spring Web Flow, Spring Shell and other top sub-projects, through reuse developers can quickly develop business applications.

2.2 Spring Boot

Spring Boot does a simple layer of Spring packaging, simplifying the development of Spring applications, by writing a small amount of code can build a simple application. It simplifies complex configuration files, provides out-of-the-box setup for Spring and third-party libraries, and provides a scaffolding for rapid development of individual microservices, making it easier and more efficient to get started and develop.

2.3 Spring Cloud

A framework for distributed service governance provides us with the suite of configuration centers, service registry discovery, circuit breakers, load balancing, micro broker, message bus, data monitoring and so on on which distributed services depend. Spring Boot is a fast configuration scaffolding of Spring. We can quickly develop a single microservice based on Spring Boot. Spring Cloud is a microservice development suite based on Spring Boot. While Spring Boot focuses on developing individual microservices quickly, Spring Cloud focuses on a global service governance framework.

Spring does not reinvent the wheel. It just combines the mature and proven service frameworks of current companies, shields the complex configuration and implementation principles through Spring Boot encapsulation, and finally provides developers with a simple, easy to deploy and maintain distributed system development kit. Microservices are service units that can be independently deployed, horizontally extended and independently accessed. Spring Cloud is the big steward of these microservices. The number of components under the microservice architecture is very large, and Spring Cloud needs to provide various solutions to manage the entire ecosystem. Spring Boot can be used independently of Spring Cloud, but Spring Cloud is inseparable from Spring Boot, and their dependencies are as follows:

Spring -> Spring Boot > Spring Cloud
Copy the code

The main value of this article is to help you sort out the knowledge framework related to Spring Cloud, which is often referred to as the global perspective or God perspective. With this framework, we can look for related node information according to our own needs to study and learn, so as not to get lost in details. Of course, considering that each of us has different work and study situations, and the problems we encounter are also different, the content of this article cannot cover all the problems we encounter, please leave your comments and ask questions.

Today first share here, if you feel valuable, please move your finger to forward to other partners in need. In addition, I will share my experience in career planning, job interviews, skills improvement and influence building in the future. Please pay attention to this column or “IT veteran brother”!

Other articles in this series are indexed below:

  • How to use Spring Cloud correctly? 【 in 】
  • How to use Spring Cloud correctly? 【 the 】