Introduction to Spring Cloud Alibaba ecology

Posted by btrsrinivasarao on Sat, 29 Jan 2022 12:52:51 +0100

Background description

Since its launch in March 2015, Spring Cloud has quickly become the preferred technology stack for developers in the Java micro service ecosystem. On the basis of Spring Boot, Spring Cloud retains java development habits, adds distributed features, and provides a series of general tools to help developers quickly build some common patterns in distributed systems. Now it has become one of the most widely used microservice architectures.

Spring Cloud is a complete set of framework for implementing microservices based on spring boot. It provides configuration management, service discovery, circuit breaker, intelligent routing, micro agent, control bus, global lock, decision election, distributed session and cluster state management and other components required for microservice development. Most importantly, when used with the spring boot framework, it will make it very convenient for you to develop cloud services of micro service architecture. Spring Cloud contains many sub frameworks. Among them, Spring Cloud netflix is one of the frameworks, which was developed by Netflix and later incorporated into the Spring Cloud family. Its main modules include: service discovery, circuit breaker, monitoring Intelligent routing, client load balancing, etc.

Spring Cloud Netflix is the most popular project. It is a part of Spring Cloud, but pivot announced that most Spring Cloud Netflix modules are entering maintenance mode. Since the release of Spring Cloud Greenwich, Netflix OSS, Archaius, Hystrix, Ribbon and Zuul are entering maintenance mode. This means that no new functionality will be added to these modules, and the Spring Cloud team will only perform some bug fixes and fix security issues. Maintenance mode does not include Eureka modules that are still supported.

In 2017, Spring Cloud Alibaba launched by Alibaba based on Spring Cloud officially settled in the Spring Cloud incubator and officially graduated in July 2019. Spring Cloud Alibaba is a standardized implementation based on Spring Cloud Common and is committed to providing microservices and developing one-stop solutions. This project includes the development of necessary components of distributed application microservices, It is convenient for developers to easily use these components to develop distributed application services through the Spring Cloud programming model, and the micro service components of Spring Cloud Alibaba depend on Spring Cloud Alibaba itself.

https://www.oschina.net/question/4489239_2321891

Hug reason

  1. Some components of Spring Cloud have stopped maintenance and updating, and there is an urgent need for the next large factory to take over the disk ecosystem
  2. The components used by Ali have experienced a lot of tests and have high stability and reliability
  3. Backed by Alibaba cloud, it has a good profit model and has the potential and strength for long-term maintenance and development

Solution

Project creation

Scaffolding provides a way to create projects through online websites

https://start.aliyun.com/bootstrap.html
https://start.spring.io/

The scaffolding provided by Alibaba cloud provides Spring Cloud Alibaba related dependencies and solves the version dependency. It is recommended to use it for the Spring Cloud Alibaba ecosystem
It is recommended to install the plug-in Alibaba Cloud Toolkit, which provides an entry for project creation and no need to visit the web page

Version dependency

https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies
https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-dependencies
https://mvnrepository.com/artifact/com.alibaba.cloud/spring-cloud-alibaba-dependencies

Select a specified version, and then drag down the page to find Managed Dependencies to see the dependent version details

Alibaba cloud provides Maven GAV query and download: https://maven.aliyun.com/mvn/search

Open source address

https://github.com/alibaba/spring-cloud-alibaba

Official documents

https://spring.io/projects/spring-cloud-alibaba
https://github.com/alibaba/spring-cloud-alibaba/blob/master/README-zh.md
https://github.com/alibaba/spring-cloud-alibaba/wiki/ Version Description

Version evolution

Hatching version

The incubation version is an earlier version and cannot be used in the production environment. You can read the source code to see the implementation ideas

Spring Boot VersionSpring Cloud VersionSpring Cloud Alibaba VersionRemarks
1.5.X.RELEASESpring Cloud Edgware0.1.X.RELEASEMinimum support Edgware SR5 version
2.0.X.RELEASESpring Cloud Finchley0.2.X.RELEASE
2.1.X.RELEASESpring Cloud Greenwich0.9.0.RELEASE

The Spring Cloud Alibaba BOM contains all the dependent versions it uses.

<dependencyManagement>
	<dependencies>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-alibaba-dependencies</artifactId>
			<version>0.9.0.RELEASE</version>
			<type>pom</type>
			<scope>import</scope>
		</dependency>	
	</dependencies>
</dependencyManagement>

Graduation version

Spring Boot VersionSpring Cloud VersionSpring Cloud Alibaba VersionRemarks
1.5.X.RELEASESpring Cloud Edgware1.5.1.RELEASEStop maintenance, upgrade recommended
2.0.X.RELEASESpring Cloud Finchley2.0.4.RELEASEStop maintenance, upgrade recommended
2.1.X.RELEASESpring Cloud Greenwich2.1.2.RELEASE
2.2.X.RELEASESpring Cloud Hoxton.RELEASE2.2.0.RELEASE
2.2.5.RELEASESpring Cloud Hoxton.SR32.2.1.RELEASE
2.1.13.RELEASESpring Cloud Greenwich.SR62.1.4.RELEASE
2.2.5.RELEASESpring Cloud Hoxton.SR82.3.2.RELEASE
2.4.2.RELEASESpring Cloud 2020.02021.1

The Spring Cloud Alibaba BOM contains all the dependent versions it uses.

<dependencyManagement>
	<dependencies>
        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-alibaba-dependencies</artifactId>
            <version>2.2.5.RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
	</dependencies>
</dependencyManagement>

Component version

Spring Cloud Alibaba VersionSentinel VersionNacos VersionRocketMQ VersionDubbo VersionSeata Version
2.1.0.RELEASE or 2.0.0.RELEASE or 1.5.0.RELEASE1.6.31.1.14.4.02.7.30.7.1
2.1.1.RELEASE or 2.0.1.RELEASE or 1.5.1.RELEASE1.7.01.1.44.4.02.7.30.9.0
2.2.0.RELEASE1.7.11.1.44.4.02.7.4.11.0.0
2.2.1.RELEASE or 2.1.2.RELEASE or 2.0.2.RELEASE1.7.11.2.14.4.02.7.61.2.0
2.2.3.RELEASE or 2.1.3.RELEASE or 2.0.3.RELEASE1.8.01.3.34.4.02.7.81.3.0
2.2.5.RELEASE or 2.1.4.RELEASE or 2.0.4.RELEASE1.8.01.4.14.4.02.7.81.3.0

Supplementary information

Spring Cloud milestone

https://github.com/spring-cloud/spring-cloud-release/milestones

Spring Cloud version evolution

https://github.com/spring-cloud/spring-cloud-release/releases

Official scaffolding dependencies

Open the browser and visit the website to view the latest dependencies: https://start.spring.io/actuator/info

{
    "git": {
        "branch": "6453e15b56f143d46fdd7eb4f4e3b6df13a8bb10",
        "commit": {
            "id": "6453e15",
            "time": "2021-06-14T12:42:48Z"
        }
    },
    "build": {
        "version": "0.0.1-SNAPSHOT",
        "artifact": "start-site",
        "versions": {
            "spring-boot": "2.5.1",
            "initializr": "0.11.0-SNAPSHOT"
        },
        "name": "start.spring.io website",
        "time": "2021-06-14T12:44:06.395Z",
        "group": "io.spring.start"
    },
    "bom-ranges": {
        "azure": {
            "2.2.4": "Spring Boot >=2.2.0.RELEASE and <2.3.0.M1",
            "3.2.0": "Spring Boot >=2.3.0.M1 and <2.4.0-M1",
            "3.5.0": "Spring Boot >=2.4.0.M1 and <2.5.0-M1"
        },
        "codecentric-spring-boot-admin": {
            "2.2.4": "Spring Boot >=2.2.0.RELEASE and <2.3.0.M1",
            "2.3.1": "Spring Boot >=2.3.0.M1 and <2.5.0-M1"
        },
        "solace-spring-boot": {
            "1.0.0": "Spring Boot >=2.2.0.RELEASE and <2.3.0.M1",
            "1.1.0": "Spring Boot >=2.3.0.M1 and <2.5.0-M1"
        },
        "solace-spring-cloud": {
            "1.0.0": "Spring Boot >=2.2.0.RELEASE and <2.3.0.M1",
            "1.1.1": "Spring Boot >=2.3.0.M1 and <2.4.0-M1",
            "2.0.0": "Spring Boot >=2.4.0.M1 and <2.5.0-M1"
        },
        "spring-cloud": {
            "Hoxton.SR11": "Spring Boot >=2.2.0.RELEASE and <2.3.999.BUILD-SNAPSHOT",
            "Hoxton.BUILD-SNAPSHOT": "Spring Boot >=2.3.999.BUILD-SNAPSHOT and <2.4.0.M1",
            "2020.0.0-M3": "Spring Boot >=2.4.0.M1 and <=2.4.0.M1",
            "2020.0.0-M4": "Spring Boot >=2.4.0.M2 and <=2.4.0-M3",
            "2020.0.0": "Spring Boot >=2.4.0.M4 and <=2.4.0",
            "2020.0.3": "Spring Boot >=2.4.1 and <2.5.2-SNAPSHOT",
            "2020.0.4-SNAPSHOT": "Spring Boot >=2.5.2-SNAPSHOT"
        },
        "spring-cloud-alibaba": {
            "2.2.1.RELEASE": "Spring Boot >=2.2.0.RELEASE and <2.3.0.M1"
        },
        "spring-cloud-gcp": {
            "2.0.0": "Spring Boot >=2.4.0-M1 and <2.5.0-M1"
        },
        "spring-cloud-services": {
            "2.2.6.RELEASE": "Spring Boot >=2.2.0.RELEASE and <2.3.0.RELEASE",
            "2.3.0.RELEASE": "Spring Boot >=2.3.0.RELEASE and <2.4.0-M1",
            "2.4.1": "Spring Boot >=2.4.0-M1 and <2.5.0-M1"
        },
        "spring-geode": {
            "1.2.12.RELEASE": "Spring Boot >=2.2.0.RELEASE and <2.3.0.M1",
            "1.3.11.RELEASE": "Spring Boot >=2.3.0.M1 and <2.4.0-M1",
            "1.4.6": "Spring Boot >=2.4.0-M1 and <2.5.0-M1",
            "1.5.0": "Spring Boot >=2.5.0-M1"
        },
        "vaadin": {
            "14.6.3": "Spring Boot >=2.1.0.RELEASE and <2.6.0-M1"
        },
        "wavefront": {
            "2.0.2": "Spring Boot >=2.1.0.RELEASE and <2.4.0-M1",
            "2.1.1": "Spring Boot >=2.4.0-M1 and <2.5.0-M1",
            "2.2.0": "Spring Boot >=2.5.0-M1"
        }
    },
    "dependency-ranges": {
        "native": {
            "0.9.0": "Spring Boot >=2.4.3 and <2.4.4",
            "0.9.1": "Spring Boot >=2.4.4 and <2.4.5",
            "0.9.2": "Spring Boot >=2.4.5 and <2.5.0-M1",
            "0.10.0": "Spring Boot >=2.5.0-M1 and <2.5.2-M1",
            "0.10.1-SNAPSHOT": "Spring Boot >=2.5.2-M1 and <2.6.0-M1"
        },
        "okta": {
            "1.4.0": "Spring Boot >=2.2.0.RELEASE and <2.4.0-M1",
            "1.5.1": "Spring Boot >=2.4.0-M1 and <2.4.1",
            "2.0.1": "Spring Boot >=2.4.1 and <2.5.0-M1"
        },
        "mybatis": {
            "2.1.4": "Spring Boot >=2.1.0.RELEASE and <2.5.0-M1",
            "2.2.0": "Spring Boot >=2.5.0-M1"
        },
        "camel": {
            "3.3.0": "Spring Boot >=2.2.0.RELEASE and <2.3.0.M1",
            "3.5.0": "Spring Boot >=2.3.0.M1 and <2.4.0-M1",
            "3.10.0": "Spring Boot >=2.4.0.M1 and <2.5.0-M1"
        },
        "open-service-broker": {
            "3.1.1.RELEASE": "Spring Boot >=2.2.0.RELEASE and <2.3.0.M1",
            "3.2.0": "Spring Boot >=2.3.0.M1 and <2.4.0-M1",
            "3.3.0": "Spring Boot >=2.4.0-M1 and <2.5.0-M1"
        }
    }
}

The focus is on the following dependencies

  • spring-cloud
  • spring-cloud-alibaba