All Projects → itmuch → Spring Cloud Dubbo Together

itmuch / Spring Cloud Dubbo Together

Spring Cloud与Dubbo共存方案

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Spring Cloud Dubbo Together

Xc Spring Cloud Alibaba
spring cloud alibaba(2.2.1最新版)+nacos+dubbo+gateWay+sentinel+rocketmq+(pgsql/mysql8.0的json支持)+ignite集成可用于docker分布式框架+分布式自动化任务+mybatis多数据源+seate+ shardingSphere分布式分库事务解决方案
Stars: ✭ 131 (-15.48%)
Mutual labels:  dubbo, spring-boot, spring-cloud
Springboot Labs
一个涵盖六个专栏:Spring Boot 2.X、Spring Cloud、Spring Cloud Alibaba、Dubbo、分布式消息队列、分布式事务的仓库。希望胖友小手一抖,右上角来个 Star,感恩 1024
Stars: ✭ 12,804 (+8160.65%)
Mutual labels:  dubbo, spring-boot, spring-cloud
Spring Cloud Cloudfoundry
Integration between Cloudfoundry and the Spring Cloud APIs
Stars: ✭ 83 (-46.45%)
Mutual labels:  microservices, spring-boot, spring-cloud
Bookstoreapp Distributed Application
Ecommerce project is being developed using Spring Boot Microservices and Spring Cloud (Backend) and React (Frontend). Splitting the Ecommerce functionality into various individual microservices so that they can be distributed, scale really well and make use of resources efficiently.
Stars: ✭ 63 (-59.35%)
Mutual labels:  microservices, spring-boot, spring-cloud
My Moments
Instagram Clone - Cloning Instagram for learning purpose
Stars: ✭ 140 (-9.68%)
Mutual labels:  microservices, spring-boot, spring-cloud
Microservices Example
Example of a microservices architecture on the modern stack of Java technologies
Stars: ✭ 66 (-57.42%)
Mutual labels:  microservices, spring-boot, spring-cloud
Spring Cloud Cli
Spring Cloud CLI features
Stars: ✭ 139 (-10.32%)
Mutual labels:  microservices, spring-boot, spring-cloud
Spring Cloud Book
《使用Spring Cloud与Docker实战微服务》开源书。讨论QQ群:731548893。配套代码:https://github.com/eacdy/spring-cloud-study
Stars: ✭ 886 (+471.61%)
Mutual labels:  microservices, spring-boot, spring-cloud
Sample Spring Microservices Advanced
More advanced samples of spring boot and spring cloud microservices showing usage of such tools like api Swagger2 on Zuul, integraction with MongoDB, configuration server, testing with Spring Cloud Contract or Hoverfly
Stars: ✭ 112 (-27.74%)
Mutual labels:  microservices, spring-boot, spring-cloud
Spring Cloud Example
Stars: ✭ 111 (-28.39%)
Mutual labels:  microservices, spring-boot, spring-cloud
Spring Cloud Config
External configuration (server and client) for Spring Cloud
Stars: ✭ 1,740 (+1022.58%)
Mutual labels:  microservices, spring-boot, spring-cloud
Learning Path Spring Boot Microservices
Curated path for learning Spring Boot & Microservices based on published videos in TechPrimers
Stars: ✭ 116 (-25.16%)
Mutual labels:  microservices, spring-boot, spring-cloud
Mini Platform
Mini-Platform致力于更简洁易用的轻量级微服务治理平台。
Stars: ✭ 45 (-70.97%)
Mutual labels:  microservices, spring-boot, spring-cloud
Okta Blog Archive
Okta Developer Blog
Stars: ✭ 74 (-52.26%)
Mutual labels:  microservices, spring-boot, spring-cloud
Mastering Microservices With Java Third Edition
Mastering Microservices with Java – Third Edition, published by Packt
Stars: ✭ 39 (-74.84%)
Mutual labels:  microservices, spring-boot, spring-cloud
Whatsmars
Java生态研究(Spring Boot + Redis + Dubbo + RocketMQ + Elasticsearch)🔥🔥🔥🔥🔥
Stars: ✭ 1,389 (+796.13%)
Mutual labels:  microservices, dubbo, spring-boot
Apollo
Apollo is a reliable configuration management system suitable for microservice configuration management scenarios.
Stars: ✭ 26,052 (+16707.74%)
Mutual labels:  microservices, spring-boot, spring-cloud
Spring Cloud Consul
Spring Cloud Consul
Stars: ✭ 703 (+353.55%)
Mutual labels:  microservices, spring-boot, spring-cloud
Spring Cloud Sleuth
Distributed tracing for spring cloud
Stars: ✭ 1,531 (+887.74%)
Mutual labels:  microservices, spring-boot, spring-cloud
Spring Cloud Build
Common build concerns, shared plugin configuration, etc. for Spring Cloud modules
Stars: ✭ 114 (-26.45%)
Mutual labels:  microservices, spring-boot, spring-cloud

README

一、背景

假设有一个遗留的Dubbo系统,现在想改用Spring Cloud。

由于遗留Dubbo系统比较庞大,短期之内无法完成技术栈的迁移。因此需要“分步走”,即:初期实现两者共存,后期逐步绞杀Dubbo应用,最终实现技术栈的统一。

p.s. 这里并没有贬低Dubbo的意思,仅是按照该场景讨论。

二、头脑风暴

架构迁移、技术栈更换、项目重构时的第一步往往不是“改造”,而是“停止修改”。基于这个原则,个人不太倾向于去立即大幅重构Dubbo应用原先的代码。原因有二:首先是原则问题,更重要的是时间成本、技术风险很难得到控制。

而,假如新编写的Spring Cloud应用去进行迁就,例如:

  • 完全不动Dubbo遗留系统,使用RestTemplate或Feign编写Dubbo(DubboX)的RESTful API客户端代理 —> 有一定的实现复杂度、Dubbo接口改造成RESTful API后,消费方都需要再次修改(开始是代理,后来不用代理,因此有二次修改的问题)。
  • 索性将Spring Cloud应用也整合Dubbo—>存在改造不完整、技术栈不统一、无法约束开发人员用哪种方式API、额外的复杂度的问题(越多的组件、越多的环节意味着越多的坑)。

考虑到一般来讲,遗留系统的改造过程中一般都是新系统调用老系统,很少出现老系统大规模调用新系统的场景(至少我这边目前是这样^_^)。因此,笔者列出几种仅需少量的代码编写成本即可实现Spring Cloud与Dubbo短期/长期共存,并且侵入性较小,同时还允许我们改造遗留Dubbo系统的几种方案,算是抛砖引玉。期待朋友们提出更优雅、成本更小的方案。

三、亮代码

Sample1:借助Ribbon调用Dubbo应用。

优点:架构不依赖Eureka或其他服务注册组件,借助Ribbon去调用Dubbo微服务暴露的RESTful API;

缺点:如果Dubbo微服务较多时,均需手动配置,不适合新式的部署环境(例如Docker,因为每次部署IP/端口可能都不同)

Sample2:借助Sidecar

使用Sidecar,Dubbo微服务必须实现健康检查(对于Spring Boot程序即:添加spring-boot-starter-actuator依赖)。

优点:

  • 这种方式下,Dubbo应用也可通过Sidecar调用Spring Cloud微服务的接口,Sidecar是连接Spring Cloud应用于Dubbo应用的桥梁。
  • 可以通过Sidecar传播Dubbo微服务的健康状态到Eureka Server。

缺点:

  • 在于每个Dubbo微服务节点必须额外部署一个Sidecar应用。
  • 在Dubbo微服务调用Spring Cloud微服务时,增加了调用链的长度。(需使用Sidecar转发)

Sample3:借助Eureka实现整合

将Dubbo应用也注册到Eureka上。

优点:

  • 没有多余的组件(除了Dubbo的注册中心ZK)
  • 没有什么局限

缺点:

  • 对于非Spring Boot的应用,改造有一定的成本。

GOING FAR

本项目中几个Demo中,都是手动编码为Dubbo应用开放RESTful API的,实际迁移过程可以借助cglib或者lombok之类的工具,实现从Dubbo接口道RESTful API的转换。本仓库主要还是为大家提供思路,不做具体讨论。

四、广告

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].