dubbo-admin icon indicating copy to clipboard operation
dubbo-admin copied to clipboard

[Feature]: Implemention of Discovery backend by nacos

Open robocanic opened this issue 4 months ago • 2 comments

What would you like to be added: We haven defined the interface of ResourceDiscovery, the implemention is needed. The core features of ResourceDiscovery includes:

  1. List and watch registry center(zookeeper, nacos), turn the objects into atom resource
  2. Turn the atom resource into dubbo domain resource(Application, Instance, Service etc.)
  3. Make the state flow of resources effectively

Why is this needed: Discovery is one of the Core Component, which is responsible for the discovery of RPC info(metadata, interface definition etc.) .

robocanic avatar Aug 24 '25 11:08 robocanic

@zhuyanhuazhuyanhua hey, are you get into some problems? If you need some help, you can get in touch with me through my wechat: robocanic

robocanic avatar Sep 19 '25 09:09 robocanic

@zhuyanhuazhuyanhua Discovery这整个component其实是对dubbo的注册中心的一个封装,这个封装在dubbo-kubernetes这个仓库中其实有一版实现,这版实现的底层是基于dubbogo来实现的。 现在需要实现的这版是希望能够参照dubbo-kubernetes的老的实现,底层还是使用dubbogo,但不过要使用当前admin中的Component,Store,Event Bus等组件来实现。一方面是考虑到dubbogo实现了一部分功能,我们要做的工作量大大减少,另一方面是dubbogo有实现基础,也有长时间的检验,所以先看基于dubbogo看能不能满足我们的需求。

具体的需求其实可以划分为如下几点:

  1. 借助dubbogo,在informer这个大的框架之下实现对注册中心数据的list-watch
  2. watch到的数据,映射到admin中定义的Resource。关键的一些Resource包括但不限于:三种路由规则(condition_route,dynamic_config,tag_route),实例(rpc_instance), 实例元信息(rpc_instance_metadata), 服务提供元信息(service_provider_metadata), 服务消费元信息(service_consumer_metadata), 服务提供映射(service_provider_metadata)
  3. 映射到Resource之后,会持久化到Store中,但这些Resource可能会和其他Resource有关联关系,也就是说在更新AResource之后,可能需要根据AResource来更新BResource,这时候需要借助Event Bus的subscriber,订阅AResource的更新,找到BResource,从而来完成这个数据级联更新的过程。

robocanic avatar Oct 14 '25 11:10 robocanic

done

robocanic avatar Dec 21 '25 11:12 robocanic