In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Spring-> Spring Boot > Spring Cloud
Just went to work these days, the company uses Spring Cloud, there is not much contact. I have to learn quickly.
If you want to learn, you have to know what a microservice is, what is Spring Boot, what is Spring Cloud, and what is the relationship between the two?
What is a microservice?
In short, the microservice architecture style is a way to develop a single application as a set of small services, each running in its own process and communicating with lightweight mechanisms (usually HTTP resource API). These services are built around business functions and can be deployed independently through a fully automated deployment mechanism. These services are least centrally managed, can be written in different programming languages, and use different data storage technologies. Each micro-service in the system can be deployed independently, and each micro-service is loosely coupled. Each microservice focuses only on completing a task and accomplishing that task well. In all cases, each task represents a small business capability.
Some common misunderstandings of micro-services
It makes sense to compare within the same category:
Microservices architecture vs. SOA-both are architectural style categories, but their areas of concern and scope are different SOA pays more attention to the scope of enterprise scale, while micro-service architecture pays more attention to the scope of application scale.
Micro service component vs. Service components-both are specific implementations that describe business functions, with differences in granularity, manageability and flexibility.
Inappropriate comparison of Conceptual confusion
Microservice vs. SOA-inappropriate comparison. Micro services are component categories, while SOA is an architectural design style. Therefore, we should compare the micro-service architecture with SOA.
Microservice vs. API-inappropriate comparison. API is an interface and a mechanism for exposing business functions. The microservice architecture is a component architecture used to implement business functions. So there is no point in comparing them directly.
Micro service vs. Service-inappropriate comparison. "Service" has different meanings in different scenarios, and the context of its description needs to be further clarified. does it refer to service implementation, service exposure, service definition or something else? The same is true of micro-services, which requires a specific context to judge whether the comparison is meaningful or not.
What is Spring Boot?
First of all, it is important to know that Spring Boot is not to replace Spring, Spring Boot is based on Spring development, to make it easier for people to use Spring.
Spring Boot simplifies Spring-based application development, creating an independent, product-level Spring application with a small amount of code. Spring Boot provides out-of-the-box settings for the Spring platform and third-party libraries so you can get started methodically. Most Spring Boot applications require very little Spring configuration.
Spring Boot is a new framework provided by the Pivotal team, which is designed to simplify the initial building and development process of new Spring applications. The framework is configured in a specific way so that developers no longer need to define a templated configuration. As I understand it, Spring Boot is not really a new framework, it defaults to the use of many frameworks, just as maven integrates all the jar packages and Spring Boot integrates all the frameworks (I don't know if this metaphor is appropriate).
The core idea of Spring Boot is that the agreement is greater than the configuration, and everything is done automatically. Using Spring Boot can greatly simplify your development model. All the common frameworks you want to integrate have corresponding component support.
What is Spring Cloud?
Spring Cloud is an ordered collection of frameworks. It makes use of the development convenience of Spring Boot to skillfully simplify the development of distributed system infrastructure, such as service discovery registration, configuration center, message bus, load balancing, circuit breaker, data monitoring and so on. It can be started and deployed with one button with the development style of Spring Boot. Spring does not repeat manufacturing wheels, it just combines the more mature service frameworks developed by various companies that can stand the actual test, and shields the complex configuration and implementation principles through Spring Boot style re-encapsulation, and finally leaves a set of distributed system development kits that are easy to understand, easy to deploy and easy to maintain.
Micro-services are service units that can be independently deployed, horizontally expanded, accessed independently (or have independent databases). Spring Cloud is the butler of these micro-services. after adopting the architecture of micro-services, the number of projects will be very large. As a butler, Spring Cloud needs to provide various solutions to maintain the whole ecology.
Spring Cloud is a framework of distributed service governance. Since it is a framework of service governance, it does not provide specific functional operations, but focuses more on communication, circuit breaker, monitoring and so on between services. So a lot of components are needed to support a set of functions.
The relationship between Spring Boot and Spring Cloud
Spring Boot is a set of rapid configuration scaffolding of Spring, which can quickly develop individual micro services based on Spring Boot. Spring Cloud is a cloud application development tool based on Spring Boot. Spring Boot focuses on individual micro services that are fast and easy to integrate, and Spring Cloud focuses on global service governance framework. Spring Boot uses the concept that the default is larger than the configuration. Many integration solutions have been selected for you. If you don't configure it, you don't have to configure it. A large part of Spring Cloud is based on Spring Boot, so can it not be based on Spring Boot? No.
Spring Boot can use development projects independently of Spring Cloud, but Spring Cloud can't do without Spring Boot, which belongs to the dependency relationship.
Welcome to follow the official account, irregular practical information, only make valuable output.
Author: Dawnzhang
Source: https://www.cnblogs.com/clwydjgs/
Copyright: copyright of this article belongs to the author
Reprint: welcome to reprint, but this statement must be retained without the consent of the author; the original link must be given in the article; otherwise, legal liability must be investigated.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.