SpringCloud微服务技术解决方案

/ SpringCloud / 没有评论 / 150浏览

说起微服务现在真的是非常的火。那到底什么是微服务呢?说的简单一点,就是将原来的单一的服务拆分成多个微小的服务,这也是微服务名字的由来。那为什么要这么做呢?这么做有什么好处呢?


微服务架构的好处:


  上面是我们对微服务进行了简单的介绍。下面我们重点介绍一下本篇的重点内容SpringCloud的技术,并且我们来详细介绍一下为什么说SpringCloud是微服务技术的解决方案。在学习SpringCloud的技术之前,我们首先要掌握SpringBoot的技术。也就是本站最新更新的那几篇文章,如有不了解的欢迎留言。SpringCloud说白了就是帮助我们快速使用SpringBoot来创建微服务的。唯一不同之处,就是SpringCloud已经我们提供了很多的模块来帮助我们快速的进行微服务的开发。例如服务注册中心、配置中心、服务通信、服务网关、服务熔断等模块。全部的模块内容在SpringCloud的官方网站中有详细的介绍。地址为:

https://spring.io/projects/spring-cloud

  下面是摘取的SpringCloud官方网站内容,主要是有关SpringCloud核心模块的名字及其简介。

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.
Spring Cloud Netflix

Integration with various Netflix OSS components (Eureka, Hystrix, Zuul, Archaius, etc.).
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.
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 election and common stateful patterns with an abstraction and implementation for Zookeeper, Redis, Hazelcast, Consul.
Spring Cloud Consul

Service discovery and configuration management with Hashicorp Consul.
Spring Cloud Security

Provides support for load-balanced OAuth2 rest client and authentication header relays in a Zuul proxy.
Spring Cloud Sleuth

Distributed tracing for Spring Cloud applications, compatible with Zipkin, HTrace and log-based (e.g. ELK) tracing.
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 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.
Spring Cloud Stream App Starters

Spring Cloud Stream App Starters are Spring Boot based Spring Integration applications that provide integration with external systems.
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 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.
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.
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").
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 Cloud CLI

Spring Boot CLI plugin for creating Spring Cloud component applications quickly in Groovy
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 Gateway

Spring Cloud Gateway is an intelligent and programmable router based on Project Reactor.
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 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).

  通过上面的一大篇的内容,我们知道SpringCloud里的内容核心模块非常非常的多,这时可能有人会比较担心,这么多的内容,我们要学习到啥时啊。我们不用有这样的顾虑,虽然都是核心的模块,但有的模块在我们的实际的开发中并不一定会用到,我们只要学习大部分微服务中常使用的模块即可。至于其它的模块,等我们在实际项目开发中用到在学习即可。除此之外,SpringCloud提供了这么多的模块,我们反而应该高兴,因为这些都是相对比较成熟的技术解决方案,可以满足我们开发微服务的各种需求。


  下面我们简单介绍一下SpringCloud中比较常见的模块,及其它们的作用。


  这就是本篇的全部内容,我们简单介绍了一下微服务的好处,及其SpringCloud中比较常见的模块。在接下来的文章中我们将按照上面介绍的内容来详细介绍一下注册中心、配置中心、服务通信、服务网关、服务熔断等方面的知识。谢谢。