從零開始搭建spring-cloud(0) --springboot與springcloud的關係

Spring Cloud provides tools for developers to quickly build some of the common patterns in distributed systems (e.g. configuration management, service discovery, circuit breakers, intelligent routing, micro-proxy, control bus, one-time tokens, global locks, leadership election, distributed sessions, cluster state). Coordination of distributed systems leads to boiler plate patterns, and using Spring Cloud developers can quickly stand up services and applications that implement those patterns. They will work well in any distributed environment, including the developer’s own laptop, bare metal data centres, and managed platforms such as Cloud Foundry.
Spring Cloud爲開發人員提供了快速構建分佈式系統中一些常見的組件(例如配置管理,服務發現,斷路器,智能路由,微代理,控制總線,一次性tokens,全局鎖,選舉,分佈式session,集羣監測)。各個組件之間能夠很好的銜接, 使用Spring Cloud開發人員能夠快速地支持實現這些組件服務和應用程序。他們將在任何分佈式環境中均可以很好地運行,即便在開發人員本身的筆記本電腦,零配置的數據中心,以及Cloud Foundry等託管平臺。java

 Features 特性

Spring Cloud 更專一於提升組件"開箱即用"的體驗,提供良好的擴展機制。git

  • Distributed/versioned configuration  分佈式/版本化配置spring

  • Service registration and discovery 服務註冊和發現數據庫

  • Routing 路由後端

  • Service-to-service calls 服務和服務之間的調用網絡

  • Load balancing 負載均衡session

  • Circuit Breakers 斷路由架構

  • Global locks 全局鎖app

  • Leadership election and cluster state 領導選舉和集羣狀態負載均衡

  • Distributed messaging 分佈式消息傳遞

 Spring Cloud採用了一種很是聲明性的方法,一般只需更改classpath或annotation就能夠使用不少特性。例以下面的一個discovery 客戶端:

@SpringBootApplication
@EnableDiscoveryClient
public class Application {
	public static void main(String[] args) {
		SpringApplication.run(Application.class, args);
	}
}

Main Projects 重要項目

Spring Cloud Config


    Centralized external configuration management backed by a git repository. The configuration resources map directly to Spring Environment but could be used by non-Spring applications if desired.

    配置中心,利用git集中管理程序的配置。 配置資源能夠直接映射到Spring環境中去,也能夠根據須要映射到其餘非Spring應用上。

Spring Cloud Netflix    

Integration with various Netflix OSS components (Eureka, Hystrix, Zuul, Archaius, etc.).

與其餘Netflix組件(Eureka, Hystrix, Zuul, Archaius等等)集成。

Spring Cloud Bus

An event bus for linking services and service instances together with distributed messaging. Useful for propagating state changes across a cluster (e.g. config change events).
     消息總線,利用分佈式消息將服務和服務實例鏈接在一塊兒,用於在一個集羣中傳播狀態的變化 

Spring Cloud Cloudfoundry

    Integrates your application with Pivotal Cloud Foundry. Provides a service discovery implementation and also makes it easy to implement SSO and OAuth2 protected resources.
    利用Pivotal Cloud Foundry集成本身的應用,提供了服務發現,而且使SSO和OAuth2的實現更加簡單。Spring Cloud for Cloudfoundry能夠輕鬆地在Cloud Foundry(平臺即服務)中運行Spring Cloud應用程序。 Cloud Foundry具備「服務」的概念,即「綁定」到應用程序的中間件,實質上爲其提供包含憑據的環境變量(例如,用於服務的位置和用戶名)。

Spring Cloud Open Service Broker

    Provides a starting point for building a service broker that implements the Open Service Broker API.
    Spring Cloud Open Service Broker是一個用於構建實現Open Service Broker API的Spring Boot應用程序的框架。(爲創建管理雲託管服務的服務代理提供了一個起點。)

Spring Cloud Cluster

Leadership election and common stateful patterns with an abstraction and implementation for Zookeeper, Redis, Hazelcast, Consul.
    提供Leadership選舉,如:Zookeeper, Redis, Hazelcast, Consul等常見狀態模式的抽象和實現。(基於Zookeeper, Redis, Hazelcast, Consul實現的領導選舉和平民狀態模式的抽象和實現)

Spring Cloud Consul

    Service discovery and configuration management with Hashicorp Consul.
    Consul 是 HashiCorp 公司推出的開源工具,用於實現分佈式系統的服務發現與配置。(基於Hashicorp Consul實現的服務發現和配置管理)

Spring Cloud Security

    Provides support for load-balanced OAuth2 rest client and authentication header relays in a Zuul proxy.
    在Zuul代理中爲OAuth2 rest客戶端和認證頭轉發提供負載均衡。

Spring Cloud Sleuth

    Distributed tracing for Spring Cloud applications, compatible with Zipkin, HTrace and log-based (e.g. ELK) tracing.
    分佈式Spring Cloud Application服務鏈路追蹤,兼容Zipkin,HTrace 和log-based(例如ELK)。

Spring Cloud Data Flow

    A cloud-native orchestration service for composable microservice applications on modern runtimes. Easy-to-use DSL, drag-and-drop GUI, and REST-APIs together simplifies the overall orchestration of microservice based data pipelines.
    一個雲本地程序和操做模型,組成數據微服務在一個結構化的平臺上。管道由Spring Boot應用程序組成,使用Spring Cloud Stream或Spring Cloud Task微服務框架構建。 這使得Spring Cloud Data Flow適用於各類數據處理用例,從導入/導出到事件流和預測分析。

Spring Cloud Stream

    A lightweight event-driven microservices framework to quickly build applications that can connect to external systems. Simple declarative model to send and receive messages using Apache Kafka or RabbitMQ between Spring Boot apps.
    基於Redis,Rabbit,Kafka實現的消息微服務,簡單聲明模型用以在Spring Cloud應用中收發消息。

Spring Cloud Stream App Starters

    Spring Cloud Stream App Starters are Spring Boot based Spring Integration applications that provide integration with external systems.
     基於Spring Boot爲外部系統提供spring的集成

Spring Cloud Task

    A short-lived microservices framework to quickly build applications that perform finite amounts of data processing. Simple declarative for adding both functional and non-functional features to Spring Boot apps.
    Spring Cloud Task的目標是爲Spring Boot應用程序提供建立短運行期微服務的功能。在Spring Cloud Task中,咱們能夠靈活地動態運行任何任務,按需分配資源並在任務完成後檢索結果。Tasks是Spring Cloud Data Flow中的一個基礎項目,容許用戶將幾乎任何Spring Boot應用程序做爲一個短時間任務執行。(短生命週期的微服務,爲SpringBooot應用簡單聲明添加功能和非功能特性。)

Spring Cloud Task App Starters

    Spring Cloud Task App Starters are Spring Boot applications that may be any process including Spring Batch jobs that do not run forever, and they end/stop after a finite period of data processing.

Spring Cloud Zookeeper

    Service discovery and configuration management with Apache Zookeeper.
    使用Apache Zookeeper做爲服務發現和配置管理

Spring Cloud AWS

    Easy integration with hosted Amazon Web Services. It offers a convenient way to interact with AWS provided services using well-known Spring idioms and APIs, such as the messaging or caching API. Developers can build their application around the hosted services without having to care about infrastructure or maintenance.
    快速和亞馬遜網絡服務集成。提供一個便捷的方式與AWS提供的服務進行交互,而開發者不須要關心他的設計與維護。

Spring Cloud Connectors

    Makes it easy for PaaS applications in a variety of platforms to connect to backend services like databases and message brokers (the project formerly known as "Spring Cloud").
    便於PaaS應用在各類平臺上鍊接到後端像數據庫和消息經紀服務。

Spring Cloud Starters

    Spring Boot-style starter projects to ease dependency management for consumers of Spring Cloud. (Discontinued as a project and merged with the other projects after Angel.SR2.)
    Spring Boot-style starter項目,以簡化Spring Cloud用戶的依賴項管理。(項目已經終止而且在Angel.SR2後的版本和其餘項目合併)

Spring Cloud CLI

    Spring Boot CLI plugin for creating Spring Cloud component applications quickly in Groovy
    使用Groovy快速搭建Spring Cloud組件。

Spring Cloud Contract

    Spring Cloud Contract is an umbrella project holding solutions that help users in successfully implementing the Consumer Driven Contracts approach.
    一旦服務和服務之間定義了契約,Spring cloud contract會爲服務消費端提供stub的mock server,這樣,用戶就能夠只關注本身的服務進行測試,同時也不須要寫大量的集成測試。

Spring Cloud Gateway

    Spring Cloud Gateway is an intelligent and programmable router based on Project Reactor.
    Spring Cloud Gateway是Spring Cloud官方推出的第二代網關框架,取代Zuul網關。網關做爲流量的,在微服務系統中有着很是做用,網關常見的功能有路由轉發、權限校驗、限流控制等做用。

Spring Cloud OpenFeign

Spring Cloud OpenFeign provides integrations for Spring Boot apps through autoconfiguration and binding to the Spring Environment and other Spring programming model idioms.    
    做爲Spring Cloud的子項目之一,Spring Cloud OpenFeign以將OpenFeign集成到Spring Boot應用中的方式,爲微服務架構下服務之間的調用提供瞭解決方案。首先,利用了OpenFeign的聲明式方式定義Web服務客戶端;其次還更進一步,經過集成Ribbon或Eureka實現負載均衡的HTTP客戶端。

Spring Cloud Pipelines

    Spring Cloud Pipelines provides an opinionated deployment pipeline with steps to ensure that your application can be deployed in zero downtime fashion and easilly rolled back of something goes wrong.

Spring Cloud Function

 Spring Cloud Function promotes the implementation of business logic via functions. It supports a uniform programming model across serverless providers, as well as the ability to run standalone (locally or in a PaaS).

 Release Trains

Spring Cloud is an umbrella project consisting of independent projects with, in principle, different release cadences. To manage the portfolio a BOM (Bill of Materials) is published with a curated set of dependencies on the individual project (see below). The release trains have names, not versions, to avoid confusion with the sub-projects. The names are an alphabetic sequence (so you can sort them chronologically) with names of London Tube stations ("Angel" is the first release, "Brixton" is the second). When point releases of the individual projects accumulate to a critical mass, or if there is a critical bug in one of them that needs to be available to everyone, the release train will push out "service releases" with names ending ".SRX", where "X" is a number.

Spring Cloud是一個大型工程項目,由一些列獨立的項目組成,在原則上具備不一樣的發佈節奏。爲了管理組合,發佈了一個BOM(版本清單),其中包含一組對單個項目的依賴關係(見下面)。爲了不與子項目混淆,發佈軟件版本串有名稱,而沒有版本。這些名字是按字母順序排列的(因此你能夠按時間順序排列),還有倫敦地鐵站的名字(「Angel」是第一個版本,「Brixton」是第二個版本)。當單個項目的發佈點累積到一個臨界量時,或者若是其中有一個臨界bug須要對全部人可用,那麼發佈序列將推出名稱以「service release」,以「.SRX」結尾。,其中「X」是一個數字。

 

Table 1. Release train Spring Boot compatibility

Release Train Boot Version

Greenwich

2.1.x

Finchley

2.0.x

Edgware

1.5.x

Dalston

1.5.x

相關文章
相關標籤/搜索