Spring Cloud Overview

Source: Internet
Author: User
Tags zookeeper pivotal cloud foundry

1. Spring Cloud Introduction

First we open spring's official website: https://spring.io/

We'll see a picture like this

This picture tells us that developing our application is like building a house,

First we need to build spring Boot, on which we can build spring cloud, and then we can build Spring cloud Data Flow

2.Spring Cloud Overview

Coordination: Distributed System simplification

Building a distributed system does not need to be complex and error-prone.

Spring Cloud provides an easy-to-use programming model for the most common distributed system patterns, helping developers build resilient, reliable, and coordinated applications.

Spring Cloud builds on spring boot, making it easy for developers to get started and increase productivity quickly.

See this picture is not a face of crazy force? Do not be afraid, the following we have to explain the above picture is God horse dongdong.

2.1 Spring Cloud Core Featured 2.1.1 Services Discovery (Service Discovery)

A dynamic directory that supports client load balancing and intelligent routing

2.1.2 Circuit Breaker (circuit breaker)

Micro-service fault tolerance and monitoring dashboard

2.1.3 Configuring Servers (Configuration Server)

Provide dynamic, centralized configuration management for your decentralized applications

2.1.4 API gateways (API Gateway)

Single entry point for API consumers (browsers, devices, other APIs)

2.1.5 Distributed Tracking (distributed tracing)

Automated application detection and operational visibility of distributed systems

2.1.6 OAuth2

Support for single sign-on, token relay and Token Exchange

2.1.7 Consumer-driven Contracts

Service Evolution mode supports HTTP-based and message-based APIs

2.2 Spring Cloud Reference manual

Spring Cloud Reference Manual: http://cloud.spring.io/spring-cloud-static/Edgware.SR3/

Getting Started Guides

    • Config configuration
    • Registry Registration
    • Breakers Circuit Breaker
    • Load Balancing balancing
    • Routing Routing
3. Spring Cloud

Spring Cloud provides developers with the tools to quickly build common patterns in distributed systems (such as configuration management, service discovery, circuit breakers, intelligent routing, micro-proxies, control buses, one-time tokens, global locking, leading elections, distributed sessions, cluster status). The coordination of distributed systems leads to boiler plate mode, and the spring cloud developers can quickly stand out for services and applications that implement these patterns. They can work well in any distributed environment, including developers ' own laptops, bare-metal data centers, and hosted platforms such as Cloud Foundry.

Spring Cloud builds spring Boot by providing a large library of libraries to enhance the behavior of the application as it is added to the classpath.

You can take advantage of the basic default behavior to get started quickly, and then configure or extend to create custom solutions when you need them.

3.1 Quick Start

The release label (see below) is actually used explicitly in only one artifact: "Spring-cloud-dependencies" (all other tags have an ordinary digital publishing label associated with their parent project).

Flexibility Pom is a BOM that you can use as a dependency management. Use the example to configure the latest version of the client and Eureka (change artifact identification to introduce additional initiators):

The recommended way to start using Spring-cloud in your project is to use a dependency management system-The following code snippet can be copied and pasted into your build. Need some help? See our Getting Started Guide for building with Maven and Gradle.

<Parent>    <groupId>Org.springframework.boot</groupId>    <Artifactid>Spring-boot-starter-parent</Artifactid>    <version>2.0.0.RELEASE</version></Parent><dependencymanagement>    <Dependencies>        <Dependency>            <groupId>Org.springframework.cloud</groupId>            <Artifactid>Spring-cloud-dependencies</Artifactid>            <version>Finchley.m9</version>            <type>Pom</type>            <Scope>Import</Scope>        </Dependency>    </Dependencies></dependencymanagement><Dependencies>    <Dependency>        <groupId></groupId>        <Artifactid>Spring-cloud-starter-config</Artifactid>    </Dependency>    <Dependency>        <groupId></groupId>        <Artifactid>Spring-cloud-starter-eureka</Artifactid>    </Dependency></Dependencies>
<repositories> <Repository> <ID>Spring-milestones</ID> <name>Spring Milestones</name> <URL>Https://repo.spring.io/libs-milestone</URL> <Snapshots> <enabled>False</enabled> </Snapshots> </Repository></repositories>

3.2 Features

Spring Cloud is focused on providing a good, real-time experience for typical use cases and extensibility mechanisms to reach other people.

    • Distributed/versioned Configuration
    • Service Registration and Discovery
    • Routing
    • Service-to-service calls
    • Load Balancing
    • Circuit Breaker
    • Global lock
    • Leadership of elections and cluster status
    • Distributed messaging

Spring Cloud takes a very explicit approach, usually with only classpath changes and/or annotations to get a lot of functionality. As a sample application for discovering clients:

@SpringBootApplication @enablediscoveryclient  Public class Application {    publicstaticvoid  main (string[] args) {        Springapplication.run (Application. class , args);}    }
3.3 Main projects Spring Cloud Config

Centralized external configuration management supported by the GIT repository. The configuration resource is mapped directly to Spring ' environment ', but can be used by non-spring applications if needed.

Spring Cloud Netflix

Integrates with various Netflix OSS components (Eureka,hystrix,zuul,archaius, etc.).

Spring Cloud Bus

An event bus used to link services and service instances with distributed messages. Used to propagate state changes across the cluster (for example, configuration change events).

Spring Cloud for Cloud Foundry

Integrate your application with pivotal Cloud Foundry. Provide service discovery implementations, and easily implement resources protected by SSO and OAuth2.

Spring Cloud Open Service Broker

Provides a starting point for building a Service broker that implements the open Service Broker API.

Spring Cloud Cluster

Leadership of elections and common stateful models for zookeeper,redis,hazelcast,consul delivery and implementation.

Spring Cloud Consul

Service discovery and configuration management with Hashicorp consul.

Spring Cloud Security

Provides support for load balancing OAuth2 rest clients and Authentication Header trunking in the Zuul agent.

Spring Cloud Sleuth

Distributed tracing for Spring cloud applications, compatible with Zipkin,htrace and log-based (for example, elk) traces.

Spring Cloud Data Flow

A cloud-local orchestration service for a modern runtime composite micro-service application. The easy-to-use DSL, drag-and-drop GUI, and Rest-api simplify the overall orchestration of the MicroServices-based data pipeline.

Spring Cloud Stream

Lightweight event-driven microservices framework to quickly build applications that can be connected to external systems. A simple declaration model that uses Apache Kafka or RABBITMQ to send and receive messages between spring boot applications.

Spring Cloud Stream App Starters

Spring Cloud Stream App starters is spring-boot-based spring integration application that can be integrated with external systems.

Spring Cloud Task

A short-lived microservices framework for quickly building applications that perform limited data processing. Adds a simple declaration of functional and non-functional functionality to the spring boot application.

Spring Cloud Task App Starters

The Spring Cloud Task Application Launcher is a spring boot application, which can be any process, including spring batch jobs that cannot be permanently run, and end/stop during a limited data processing period.

Spring Cloud Zookeeper

Use Apache zookeeper for service discovery and configuration management.

Spring Cloud for Amazon Web Services

Integrates easily with hosted Amazon Web Services. It provides a convenient way to use well-known spring idioms and APIs, such as messaging or caching APIs, to interact with services provided by AWS.

Developers can build applications around managed services without needing to be concerned with infrastructure or maintenance.

Spring Cloud Connectors

Make it easy for PAAs applications on a variety of platforms to connect to back-end services such as databases and message brokers, formerly known as Spring Cloud.

Spring Cloud Starters

The Spring-boot starter program reduces dependency management for spring cloud consumers. (terminated as a project and merged with other projects after ANGEL.SR2.) )

Spring Cloud CLI

Spring Boot CLI Plug-in for quick creation of Spring cloud component applications in groovy

Spring Cloud Contract

Spring Cloud Contract is a comprehensive project that covers a wide range of solutions to help users successfully implement a consumer-driven contract approach.

Spring Cloud Gateway

Spring Cloud Gateway is an intelligent, programmable router based on project reactor.

Spring Cloud Openfeign

Spring Cloud openfeign provides integration for spring boot applications by automatically configuring and binding to spring environment and other spring programming model idioms.

Release Trains

Spring Cloud is a comprehensive project consisting of separate projects, in principle it has a different release rhythm. To manage the portfolio, the BOM (BOM) is published along with a set of policies in individual projects (see below). The release version has a name, not a version, to avoid confusion with the subproject. The name is an alphabetical order (so you can arrange in chronological order) with the name of the London metro station ("Angel" is the first version, "Bree" is the second one). When the number of points in a single project reaches critical mass, or if a critical flaw in one of the items needs to be provided to everyone, the release training will be launched with the name ". SRX "service Version", where "X" is a number.

Publish Content List

Component EDGWARE.SR3 finchley.m9 Finchley.build-snapshot
Spring-cloud-aws 1.2.2.RELEASE 2.0.0.m4 2.0.0.build-snapshot
Spring-cloud-bus 1.3.2.RELEASE 2.0.0.m7 2.0.0.build-snapshot
Spring-cloud-cli 1.4.1.RELEASE 2.0.0.m1 2.0.0.build-snapshot
Spring-cloud-commons 1.3.3.RELEASE 2.0.0.m9 2.0.0.build-snapshot
Spring-cloud-contract 1.2.4.RELEASE 2.0.0.m8 2.0.0.build-snapshot
Spring-cloud-config 1.4.3.RELEASE 2.0.0.m9 2.0.0.build-snapshot
Spring-cloud-netflix 1.4.4.RELEASE 2.0.0.m8 2.0.0.build-snapshot
Spring-cloud-security 1.2.2.RELEASE 2.0.0.m3 2.0.0.build-snapshot
Spring-cloud-cloudfoundry 1.1.1.RELEASE 2.0.0.m3 2.0.0.build-snapshot
Spring-cloud-consul 1.3.3.RELEASE 2.0.0.m7 2.0.0.build-snapshot
Spring-cloud-sleuth 1.3.3.RELEASE 2.0.0.m9 2.0.0.build-snapshot
Spring-cloud-stream Ditmars.sr3 Elmhurst.rc3 Elmhurst.build-snapshot
Spring-cloud-zookeeper 1.2.1.RELEASE 2.0.0.m7 2.0.0.build-snapshot
Spring-boot 1.5.10.RELEASE 2.0.0.RELEASE 2.0.0.build-snapshot
Spring-cloud-task 1.2.2.RELEASE 2.0.0.m3 2.0.0.RELEASE
Spring-cloud-vault 1.1.0.RELEASE 2.0.0.m6 2.0.0.build-snapshot
Spring-cloud-gateway 1.0.1.RELEASE 2.0.0.m9 2.0.0.build-snapshot
Spring-cloud-openfeign 2.0.0.m2 2.0.0.build-snapshot

Finchley builds and uses spring boot 2.0.x, and does not want to be used with spring boot 1.5.x.

The Dalston and Edgware distributions are built on spring boot 1.5.x and do not want to be used with spring boot 2.0.x.

The Camden release is built on spring Boot 1.4.x, but is also tested using 1.5.x.

Note: Trains issued by Brixton and Angel were marked as life cycle (EOL) in July 2017.

The Brixton release is based on the spring Boot 1.3.x, but is also tested using 1.4.x.

The Angel version series is built on spring boot 1.2.x and is not compatible with spring boot 1.3.x in some regions. The Brixton is built on the spring Boot 1.3.x and is incompatible with 1.2.x. Some angel-based libraries and most applications run well on Brixton, but when using OAuth2 features in Spring-cloud-security 1.0.x (in most cases they are ported to spring in 1.3.0 Boot) needs to be changed.

Use your dependency management tools to control the version. If you are using MAVEN, keep in mind that the first version is declared as wins, so in order to declare the BOM, the first version is usually the latest version (for example, if you want to use Spring boot 1.3.6 and Brixton.release, the first of the BOM will be boot). If you use the Spring dependency management plug-in, the same rules apply to Gradle.

Note: The release version contains spring cloud dependencies and spring-cloud-starter-parent. You can use the parent as you would with spring-boot-starter-parent (if you are using MAVEN). If you only need to rely on management, the "dependent" version is the bom-only version of the same thing (contains only dependency management, no plug-in declarations, or direct references to spring or spring boot). If you use the Spring boot parent pom, you can use the BOM in spring Cloud. The opposite is true: using the cloud parent makes it impossible or at least unreliable, or you can use the start BOM to change the spring boot version and its dependencies.

Sample Projects
    • Config Server
    • Service Registry
    • Circuit Breaker Dashboard
    • Business Application (Customers and Stores)
    • OAuth2 Authorization Server
    • OAuth2 SSO Client
    • Integration Test Samples
    • Spring Cloud Contract Samples

Spring Cloud Overview

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.