What is Spring Cloud? What are the advantages and disadvantages? What is the order of learning?

Foreword:

Spring Cloud provides developers with tools to quickly build some common patterns in distributed systems (such as configuration management, service discovery, circuit breakers, intelligent routing, micro-agents, control buses). The coordination of distributed systems has led to boilerplate patterns, and Spring Cloud developers can quickly support services and applications that implement these patterns. They will run well in any distributed environment, including developers’ own laptops, bare metal data centers, and hosting platforms such as Cloud Foundry.

It has many characteristics:

  1. Spring Cloud focuses on providing good out-of-the-box experience with typical use cases and scalability mechanism coverage.
  2. Distributed/versioned configuration
  3. Service registration and discovery
  4. routing
  5. service-to-service call
  6. Load balancing
  7. breaker
  8. Distributed messaging

Spring Cloud is an ordered collection of a series of frameworks. It uses the development convenience of Spring Boot to simplify the development of distributed systems, such as service discovery, service gateway, service routing, and link tracking. Spring Cloud does not repeat the wheel, but integrates and encapsulates the better developed modules on the market, thereby reducing the development cost of each module. In other words: Spring Cloud provides the "family bucket" needed to build a distributed system.

I also have a variety of learning materials and learning videos about Java. If you need it, you can click to enter, the code: cszq , get it for free!

1. The location of the Spring Cloud project

Sping Cloud is a top-level project of Spring. The list of top-level projects of Spring is as follows:

  • Spring IO platform: It is used for system deployment. It is an integrated version platform for building modern applications. Specifically, it works when you use maven dependency to import spring jar packages.
  • Spring Boot: aims to simplify the creation of product-level Spring applications and services, simplify configuration files, use an embedded web server, and contain many out-of-the-box microservice functions, which can be deployed in conjunction with spring cloud.
  • Spring Framework: the commonly referred to as spring framework, is an open source Java/Java EE full-featured stack application framework, and other spring projects such as spring boot also rely on this framework.
  • Spring Cloud: Microservice toolkit, which provides developers with development toolkits for configuration management, service discovery, circuit breakers, intelligent routing, micro-agents, and control buses in distributed systems.
  • Spring XD: It is a runtime environment (server software, non-development framework) that combines spring technologies, such as spring batch, spring boot, and spring data, to collect and process big data.
  • Spring Data: It is a toolkit for data access and operation, which encapsulates many kinds of data and database access related technologies, including: jdbc, Redis, MongoDB, Neo4j, etc.
  • Spring Batch: Batch processing framework, or batch task execution manager, functions include task scheduling, logging/tracking, etc.
  • Spring Security: is a security framework that can provide a declarative security access control solution for Spring-based enterprise application systems.
  • Spring Integration: A programming framework for enterprise application integration (EAI/ESB). Supported communication methods include HTTP, FTP, TCP/UDP, JMS, RabbitMQ, Email, etc.
  • Spring Social: A set of toolkits, a set of connected social service APIs, such as Twitter, Facebook, LinkedIn, GitHub, etc. There are dozens of them.
  • Spring AMQP: A toolkit for message queue operations, which mainly encapsulates RabbitMQ operations.
  • Spring HATEOAS: is a development library used to support the implementation of hypertext-driven REST Web services.
  • Spring Mobile: It is an extension of Spring MVC to simplify the development of web applications on mobile phones.
  • Spring for Android: It is an extension of the Spring framework. Its main purpose is to simplify the development of Android local applications and provide RestTemplate to access Rest services.
  • Spring Web Flow: The goal is to become the best solution for managing the web application page flow. The page jump flow is managed separately and can be configured.
  • Spring LDAP: is a Java toolkit for operating LDAP, based on Spring's JdbcTemplate mode to simplify LDAP access.
  • Spring Session: A development toolkit for session management, allowing you to save sessions to redis, etc. for clustered session management.
  • Spring Web Services: It is a Spring-based Web service framework that provides SOAP service development and allows Web services to be created in a variety of ways.
  • Spring Shell: Provides an interactive Shell that allows you to use a simple Spring-based programming model to develop commands, such as Spring Roo commands.
  • Spring Roo: It is an auxiliary tool for Spring development. It uses command line operations to generate automation projects. The operation is very similar to Rails.
  • Spring Scala: A encapsulation of the spring framework provided for Scala language programming (a new programming language, Scala for the Java platform was released at the end of 2003/early 2004).
  • Spring BlazeDS Integration: A development RIA toolkit that can integrate Adobe Flex, BlazeDS, Spring and Java technologies to create RIA.
  • Spring Loaded: An open source tool used to implement hot deployment of java programs and web applications.
  • Spring REST Shell: You can call the command line tool of the Rest service, and press the command line to operate the Rest service.

Second, the subprojects of Spring Cloud

Insert picture description here

Third, the current situation of Spring Cloud

At present, there are not many companies that use Spring Cloud technology in China. It is not because Spring Cloud is not good. The main reasons are as follows:

  1. Spring Cloud has fewer Chinese documents, and there are not many solutions for problems on the Internet.
  2. Most domestic entrepreneurial companies are employees of the Ali department, and the Ali department mostly uses Dubbo to build a microservice architecture.
  3. Large companies basically have their own distributed solutions, and many small and medium-sized companies do not use microservices, so there is no need to adopt Spring Cloud.

However, microservice architecture is a trend, and Spring Cloud is a leader in microservice solutions.

Fourth, the advantages and disadvantages of Spring Cloud

advantage:

  1. Service splitting has a finer granularity, which is conducive to resource reuse and improves development efficiency
  2. Can more accurately formulate an optimized service plan and improve the maintainability of the system
  3. Microservice architecture adopts decentralized thinking, and lightweight communication such as Restful is adopted between services, which is lighter than ESB
  4. Suitable for the Internet era, product iteration cycle is shorter

Disadvantages:

  1. Too many microservices and high governance costs are not conducive to system maintenance
  2. The high cost of distributed system development (fault tolerance, distributed transactions, etc.) challenges the team

Generally speaking, the advantages outweigh the disadvantages. At present, it seems that Spring Cloud is a very complete distributed framework. At present, many companies start to use microservices and the advantages of Spring Cloud are obvious. Therefore, for students who want to study microservice architecture, learning Spring Cloud is a good choice.

Five, Spring Cloud and Dubbo comparison

Dubbo only implements service governance, and Spring Cloud implements all aspects of the microservice architecture, and service governance is only one aspect. Let's compare them with a picture below: It
Insert picture description here
can be seen that Spring Cloud is more comprehensive, while Dubbo only implements service governance and needs to integrate other modules, which need to be introduced separately, which increases learning costs and integration costs.

Six, Spring Cloud learning route

Spring Cloud is based on Spring Boot, so before studying Spring Cloud, we must first learn the usage of Spring Boot to facilitate subsequent learning of Spring Cloud.

I won't explain springboot for the time being. By default, everyone has the basics. In the follow-up, a series of springboot explanations will be added indirectly, and the usage of SpringMVC will not be explained. Therefore, readers need to have studied Spring and SpringMVC.

Learning Springcloud can roughly be divided into four parts:

  • In the first part, get to know Spring Boot, master the basic knowledge of Spring Boot, and lay a good foundation for the follow-up introduction to Spring Cloud.
  • The second part of the introduction to Spring Cloud, mainly introduces the
    common modules of Spring Cloud , including service discovery, service registration, configuration center, link tracking, exception handling, etc.
  • The third part, Spring Cloud Advanced, introduces issues such as transaction processing and thread safety in large-scale distributed systems, and teaches you how to build a complete microservice system with an example project.
  • The fourth part is the Spring Cloud Advanced Part. It analyzes the Spring Cloud source code and explains how to deploy a large distributed system based on Spring Cloud.

Conclusion:

I have also compiled a large number of real Java interview questions, as well as a large number of Java learning materials and learning videos. If you need it, you can click to enter, the secret code: cszq , available for free!
Insert picture description here
Insert picture description here

Finally, I wish you all the best in your work!

Guess you like

Origin blog.csdn.net/m0_45270667/article/details/108999252