You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@dubbo.apache.org by Huxing Zhang <hu...@apache.org> on 2018/12/13 16:53:35 UTC

Dubbo and its microservice Ecosystem

Hi,

Recently, I have seen people asking questions like:
- What is the difference between Dubbo and Spring Cloud?
- Can Dubbo support restful service?

This makes me think about the relationship between Dubbo as an RPC
framework and Micro-services.

When talking about micro-services, we are talking about service
registry and discovery, configuration, circuit breaker, observability
like tracing, logging, API gateway, load balancing and etc.

When I looked into Dubbo, actually I see very well integration with
most of components.

- service registry and discovery: zookeeper, Nacos, etc...
- configuration: Nacos, Apollo, etc...
- circuit breaker: hystrix, sentinel
- tracing: zipkin, sleuth, skywalking

Some other components might need some extra work, for example, API
gateway, client side load balancing. But this should be achieved
without too much work. What we are missing is some official guidance.

With these components surrounded by, I am thinking that the Dubbo
Ecosystem is not only RPC Ecosystem, it is actually a Microservice
Ecosystem.

There is currently a Dubbo ecosystem in the community page on the
website[1], I suggest we build a dedicated page on the website, to
introduce the new Dubbo Ecosystem.

Now back to the questions:

- What is the difference between Dubbo and Spring Cloud?
They are not something that should be compared. Spring Cloud provide
an easy way for developer to quickly build microservices. Dubbo should
be easily integrated into Spring Cloud. I see a project call Spring
Cloud Alibaba[2]. I think it should integrate Dubbo as well, it is
already in their roadmap. People who write Spring Cloud application
should be easily talking to service provided by Dubbo, either via
restful or native Dubbo service. Dubbo spring boot starter project is
a very good example to show how Dubbo and Spring project and work
together.

- Can Dubbo support restful service?
Dubbo has out-of-box support of result service which is based on
JAX-RS 2.0 since 2.6.0. Implement a restful service is as simple as
adding some annotation to your existing services.
We need more documentation, tutorial, maybe we need to talk more about
this on the meetup.

[1] http://dubbo.apache.org/en-us/community/index.html
[2] https://github.com/spring-cloud-incubator/spring-cloud-alibaba



--
Best Regards!
Huxing

Re: Dubbo and its microservice Ecosystem

Posted by Huxing Zhang <hu...@apache.org>.
Hi,

Several days ago I have posted an email to describe Dubbo has its ecosystem.

These days I thought more about this topic, and I'd like to share some
of the thoughts here.

For years Dubbo has been played important role in helping users to
migration from monolithic application to distributed services. It is
good to see that Dubbo has offered help in areas like service
registration, service discovery, and service governance for a
distributed applications.

As more and more companies are embracing micro-services, we found that
Dubbo, as a RPC framework, could not meet the various need of
micro-services, such as API gateway, circuit breaker, monitoring,
distributed transactions, etc. We lack an entire solution to build
micro-service with Dubbo. It should cover all the areas of when
building microservices. The components should be selected and
evaluated by the community. They should be well integrated with Dubbo,
battle tested in the production system, and easy for developers to
use.

Therefore I am going to propose that:

1. Update Dubbo's positioning. Dubbo is more than a RPC framework, it
is a micro-service framework which helps developers to build high
performance micro-service applications.
2. Establish Apache Dubbo Ecosystem. It contains multiple projects
around Apache Dubbo, which provides production-ready best practices to
build microservices applications.

According to the importance to build microservices, I suggest to
divide the components into different levels:

* Level 0: RPC/Rest/Mesh, this level includes the core infrastructure
of micro-services
* Level 1: Registry, Configuration, Metrics, Reliability(e.g. Circuit
breaker) , these are crucial components of micro-services
* Level 2: API gateway, Tracing, Diagnostics, Transaction
* Level 3: Scheduling, Event, Authentication, etc.

Another feature of the components in the ecosystem is that the data of
different components can be easily retrieved by each other, so that it
can have one-stop monitoring and management. For example, we can use
dubbo-ops to monitor and manage these components in the ecosystem.

What needs to be included in the ecosystem remains to be discussed.
For example, for service registry we support Apache Zookeeper, and it
is better to add support for Etcd, and Nacos. For configuration,
Apollo and Nacos seems to be good candidates. For circuit breaker,
Sentinel looks really promising.

It is important to note that not every component should be built from
scratch, instead it is better to integrate with well-known,
production-ready projects.

This is my initial thoughts, any feedback is welcome.

Below is the Chinese version:

随着近几年微服务的流行,越来越多的用户选择从单体应用向分布式应用进行转型。很高兴的看到近几年的过程中,Dubbo提供的服务注册发现,远程服务调用,以及服务监控治理的能力帮助到企业在架构转型中受益。

但是微服务化的逐渐深入,我们也发现Dubbo目前提供的能力逐渐无法满足微服务的各个方面需求。例如API
gateway,熔断限流,分布式监控,分布式事务等方面,缺乏一套比较完整的围绕Dubbo的解决方案,基本上要么是是各个公司自研,要么需要调研外面开源的各种框架进行调研选型,花费了比较大的时间和精力在这上面,却无法形成一套体系化的方案。我们应当围绕Dubbo打造一整套微服务的解决方案,它包含了一系列的项目,涵盖微服务开发中的各个方面。这里面的项目都是经过Dubbo社区共同评估过,和Dubbo进行高度集成,且在生产中得到过验证的项目。

基于此,我建议:

1. 更新Dubbo的定位,Dubbo不仅仅是一个RPC框架,它是一个微服务框架,帮助开发者快速构建高性能微服务应用
2. 建立Apache Dubbo Ecosystem ,它是围绕 Apache Dubbo 打造的微服务生态,是经过生产验证的微服务的最佳实践组合

根据微服务构建的重要性,我们可以把各个组件划分为几个层级:

* Level 0: RPC/Rest/Mesh,
* Level 1: 服务注册发现, 服务配置, Metrics, 熔断限流
* Level 2: API gateway, 分布式追踪, 诊断, 分布式事务
* Level 3: 分布式调度, 事件, 鉴权等等

各组件之间的数据能够互通,使得各个组件之间能够进行一站式的管控。例如可以通过dubbo-ops对熔断限流的阈值进行配置等等。

生态里面的各个组件的实现具体应当选择谁,这个是另外一个话题。比如服务注册发现目前已经支持了Zookeeper,后续可以考虑支持Etcd和Nacos。配置中心Apollo和Nacos都是很好的候选。熔断限流方面Sentinel看起来是一个不错的选择。应该和那些进行集成,希望大家一起来参与讨论,由社区共同决定。并不是所有的组件都要重新实现一遍,和已有的成熟的开源组件进行集成是一条更为可行的路。

以上是我的一些想法,希望大家多多提意见。


On Fri, Dec 14, 2018 at 12:53 AM Huxing Zhang <hu...@apache.org> wrote:
>
> Hi,
>
> Recently, I have seen people asking questions like:
> - What is the difference between Dubbo and Spring Cloud?
> - Can Dubbo support restful service?
>
> This makes me think about the relationship between Dubbo as an RPC
> framework and Micro-services.
>
> When talking about micro-services, we are talking about service
> registry and discovery, configuration, circuit breaker, observability
> like tracing, logging, API gateway, load balancing and etc.
>
> When I looked into Dubbo, actually I see very well integration with
> most of components.
>
> - service registry and discovery: zookeeper, Nacos, etc...
> - configuration: Nacos, Apollo, etc...
> - circuit breaker: hystrix, sentinel
> - tracing: zipkin, sleuth, skywalking
>
> Some other components might need some extra work, for example, API
> gateway, client side load balancing. But this should be achieved
> without too much work. What we are missing is some official guidance.
>
> With these components surrounded by, I am thinking that the Dubbo
> Ecosystem is not only RPC Ecosystem, it is actually a Microservice
> Ecosystem.
>
> There is currently a Dubbo ecosystem in the community page on the
> website[1], I suggest we build a dedicated page on the website, to
> introduce the new Dubbo Ecosystem.
>
> Now back to the questions:
>
> - What is the difference between Dubbo and Spring Cloud?
> They are not something that should be compared. Spring Cloud provide
> an easy way for developer to quickly build microservices. Dubbo should
> be easily integrated into Spring Cloud. I see a project call Spring
> Cloud Alibaba[2]. I think it should integrate Dubbo as well, it is
> already in their roadmap. People who write Spring Cloud application
> should be easily talking to service provided by Dubbo, either via
> restful or native Dubbo service. Dubbo spring boot starter project is
> a very good example to show how Dubbo and Spring project and work
> together.
>
> - Can Dubbo support restful service?
> Dubbo has out-of-box support of result service which is based on
> JAX-RS 2.0 since 2.6.0. Implement a restful service is as simple as
> adding some annotation to your existing services.
> We need more documentation, tutorial, maybe we need to talk more about
> this on the meetup.
>
> [1] http://dubbo.apache.org/en-us/community/index.html
> [2] https://github.com/spring-cloud-incubator/spring-cloud-alibaba
>
>
>
> --
> Best Regards!
> Huxing



--
Best Regards!
Huxing