19 张图概览 Spring Cloud
点击关注 ? 芋道源码 文章源自JAVA秀-https://www.javaxiu.com/23885.html
收录于话题文章源自JAVA秀-https://www.javaxiu.com/23885.html
#芋道源码文章源自JAVA秀-https://www.javaxiu.com/23885.html
71个文章源自JAVA秀-https://www.javaxiu.com/23885.html
点击上方“芋道源码”,选择“设为星标”文章源自JAVA秀-https://www.javaxiu.com/23885.html
管她前浪,还是后浪?文章源自JAVA秀-https://www.javaxiu.com/23885.html
能浪的浪,才是好浪!文章源自JAVA秀-https://www.javaxiu.com/23885.html
每天 8:55 更新文章,每天掉亿点点头发...文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html 源码精品专栏文章源自JAVA秀-https://www.javaxiu.com/23885.html
原创 | Java 2020 超神之路,很肝~文章源自JAVA秀-https://www.javaxiu.com/23885.html
中文详细注释的开源项目文章源自JAVA秀-https://www.javaxiu.com/23885.html
RPC 框架 Dubbo 源码解析文章源自JAVA秀-https://www.javaxiu.com/23885.html
网络应用框架 Netty 源码解析文章源自JAVA秀-https://www.javaxiu.com/23885.html
消息中间件 RocketMQ 源码解析文章源自JAVA秀-https://www.javaxiu.com/23885.html
数据库中间件 Sharding-JDBC 和 MyCAT 源码解析文章源自JAVA秀-https://www.javaxiu.com/23885.html
作业调度中间件 Elastic-Job 源码解析文章源自JAVA秀-https://www.javaxiu.com/23885.html
分布式事务中间件 TCC-Transaction 源码解析文章源自JAVA秀-https://www.javaxiu.com/23885.html
Eureka 和 Hystrix 源码解析文章源自JAVA秀-https://www.javaxiu.com/23885.html
Java 并发源码文章源自JAVA秀-https://www.javaxiu.com/23885.html
来源:cnblogs.com/three-fighter/p/13485459.html文章源自JAVA秀-https://www.javaxiu.com/23885.html
1、什么是微服务文章源自JAVA秀-https://www.javaxiu.com/23885.html
1.1、架构演进文章源自JAVA秀-https://www.javaxiu.com/23885.html
1.2、微服务架构文章源自JAVA秀-https://www.javaxiu.com/23885.html
1.3、微服务解决方案文章源自JAVA秀-https://www.javaxiu.com/23885.html
2、SpringCloud概览文章源自JAVA秀-https://www.javaxiu.com/23885.html
2.1、什么是SpringCloud文章源自JAVA秀-https://www.javaxiu.com/23885.html
2.1、SpringCloud主要组件文章源自JAVA秀-https://www.javaxiu.com/23885.html
3、总结文章源自JAVA秀-https://www.javaxiu.com/23885.html
1、什么是微服务
1.1、架构演进
架构的发展历程是从单体式架构,到分布式架构,到SOA架构,再到微服务架构。文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
单体架构:未做任何拆分的Java Web程序文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
分布式架构:按照业务垂直划分,每个业务都是单体架构,通过API互相调用。文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
SOA架构:SOA是一种面向服务的架构。其应用程序的不同组件通过网络上的通信协议向其它组件提供服务或消费服务,所以也是分布式架构的一种。文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
1.2、微服务架构
微服务架构在某种程度上是SOA架构的进一步的发展。文章源自JAVA秀-https://www.javaxiu.com/23885.html
微服务目前并没有比较官方的定义。微服务 Microservices 之父,马丁.福勒,对微服务大概的概述如下:文章源自JAVA秀-https://www.javaxiu.com/23885.html
就目前而言,对于微服务业界并没有一个统一的、标准的定义(While there is no precise definition of this architectural style ) 。文章源自JAVA秀-https://www.javaxiu.com/23885.html
但通常在其而言,微服务架构是一种架构模式或者说是一种架构风格,它提倡将单一应用程序划分成一组小的服务,每个服务运行独立的自己的进程中,服务之间互相协调、互相配合,为用户提供最终价值。文章源自JAVA秀-https://www.javaxiu.com/23885.html
服务之间采用轻量级的通信机制互相沟通(通常是基于 HTTP 的 RESTful API ) 。每个服务都围绕着具体业务进行构建,并且能够被独立地部署到生产环境、类生产环境等。文章源自JAVA秀-https://www.javaxiu.com/23885.html
另外,应尽量避免统一的、集中式的服务管理机制,对具体的一个服务而言,应根据业务上下文,选择合适的语言、工具对其进行构建,可以有一个非常轻量级的集中式管理来协调这些服务。可以使用不同的语言来编写服务,也可以使用不同的数据存储。文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
1.3、微服务解决方案
目前最流行的两种微服务解决方案是SpringCloud和Dubbo。文章源自JAVA秀-https://www.javaxiu.com/23885.html
2、SpringCloud概览
2.1、什么是SpringCloud
Spring Cloud 作为 Java 言的微服务框架,它依赖于 Spring Boot ,有快速开发、持续交付和容易部署等特点。Spring Cloud 的组件非常多,涉及微服务的方方面面,井在开源社区 Spring、Netflix Pivotal 两大公司的推动下越来越完善。文章源自JAVA秀-https://www.javaxiu.com/23885.html
SpringCloud是一系列组件的有机集合。文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
2.1、SpringCloud主要组件
2.1.1、Eureka
Netflix Eureka 是由 Netflix 开源的一款基于 REST 的服务发现组件,包括 Eureka Server 及 Eureka Client。文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
2.1.2、Ribbon
Ribbon Netflix 公司开源的一个负载均衡的组件。文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
2.1.3、Feign
Feign是是一个声明式的Web Service客户端。文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
2.1.4、Hystrix
Hystrix是Netstflix 公司开源的一个项目,它提供了熔断器功能,能够阻止分布式系统中出现联动故障。文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
2.1.5、Zuul
Zuul 是由 Netflix 孵化的一个致力于“网关 “解决方案的开源组件。文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
2.1.6、Gateway
Spring Cloud Gateway 是 Spring 官方基于 Spring 5.0、 Spring Boot 2.0 和 Project Reactor 等 技术开发的网关, Spring Cloud Gateway 旨在为微服务架构提供简单、 有效且统一的 API 路由 管理方式。文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
2.1.7、Config
Spring Cloud 中提供了分布式配置中 Spring Cloud Config ,为外部配置提供了客户端和服务器端的支持。文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
2.1.8、 Bus
使用 Spring Cloud Bus, 可以非常容易地搭建起消息总线。文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
2.1.9、OAuth2
Sprin Cloud 构建的微服务系统中可以使用 Spring Cloud OAuth2 来保护微服务系统。文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
2.1.10、Sleuth
Spring Cloud Sleuth是Spring Cloud 个组件,它的主要功能是在分布式系统中提供服务链路追踪的解决方案。文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
3、总结
本文中对架构的演进及Spring Cloud 构建微服务的基本组件进行了概览。文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
推荐 GitHub 仓库:https://github.com/YunaiV/SpringBoot-Labs文章源自JAVA秀-https://www.javaxiu.com/23885.html
欢迎加入我的知识星球,一起探讨架构,交流源码。加入方式,长按下方二维码噢:文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
已在知识星球更新源码解析如下:文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
最近更新《芋道 SpringBoot 2.X 入门》系列,已经 20 余篇,覆盖了 MyBatis、Redis、MongoDB、ES、分库分表、读写分离、SpringMVC、Webflux、权限、WebSocket、Dubbo、RabbitMQ、RocketMQ、Kafka、性能测试等等内容。文章源自JAVA秀-https://www.javaxiu.com/23885.html
提供近 3W 行代码的 SpringBoot 示例,以及超 4W 行代码的电商微服务项目。文章源自JAVA秀-https://www.javaxiu.com/23885.html
获取方式:点“在看”,关注公众号并回复 666 领取,更多内容陆续奉上。文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章源自JAVA秀-https://www.javaxiu.com/23885.html
文章有帮助的话,在看,转发吧。谢谢支持哟 (*^__^*)文章源自JAVA秀-https://www.javaxiu.com/23885.html
阅读原文文章源自JAVA秀-https://www.javaxiu.com/23885.html

评论