-
Notifications
You must be signed in to change notification settings - Fork 26.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Dubbo Cloud Native: To Add Service registration and discovery abstract #3942
Comments
应用粒度注册服务注册与发现解决微服务拆分的问题如应用app1一拆为二:app1、app3,面向application的服务发现无法监听新增的app3,可能导致地址无法推送、服务接口调用失败。 **解决方案:**中心化存储中增加interface -> application映射关系,消费端同时监听interfaces、services下的两级目录 实例节点元数据{
endpoints: [{protocol, ip, port}, {protocol, ip, port}]
// 实例环境标
weight:100,
version:v1,
environment:test
} MetadataService
public interface DubboMetadataService {
String VERSION = "1.0.0";
String getVersion(); //如果要做版本隔离:metadataservice定义就需要注册到注册中心,或者就需要遍历每个实例的getVersion()
List<String> getExportedUrls();
List<String> getReferedUrls();
String getExportedURLs(String serviceInterface, String group, String version);
String getExportedURLs(String serviceInterface);
}
使用方式关键信息:消费的application列表、application和reference的包含关系、registry注册模式
迁移与改造 <!-- 迁移需要定义两个registry,默认是老的注册模型,使用新模型加mode=application参数 -->
<dubbo:registry address="zookeeper://127.0.0.1:2181"/>
<dubbo:registry address="zookeeper://127.0.0.1:2181?mode=application"/>
<!-- 终态。某个版本开始默认以新的模型做服务注册发现 -->
<dubbo:registry address="zookeeper://127.0.0.1:2181"/> 元数据存储ApplicationModel 注册中心
定义一套新的应用级别的服务发现接口,用于实现面向应用的Registry和DiscoveryClient,驱动老的Regsitry接口与MetadataService的对接,以实现复用老的URL运转流程 裸的API方式需要一个统一的启动入口,以实现应用级别的服务暴露与注册,Spring的事件入口,如ContextRefreshedEvent?代理到API入口 |
…and discovery abstract
…and discovery abstract
* Polish apache/incubator-dubbo/#4096 : To add new module for Dubbo Event * Polish #3942 : Dubbo Cloud Native: To Add Service registration and discovery abstract * Polish #3946 : Dubbo Cloud Native : To Add Dubbo metadata service * Polish #4093 : To add exported and unexported events for ServiceConfig * Polish #3984 : Add Service registration and discovery implementation for Zookeeper * Polish #4104 : To add initialized and destroyed events for ReferenceConfig * Polish #3946 : Refactor Dubbo metadata service * Polish #3946 : To Add MetadataServiceExporter into dubbo-config-api * Update ${project.parent.version} * Polish #3946 : Refactor Dubbo metadata service * Polish apache/incubator-dubbo/#4096 : Remove the duplicated word * Polish #4119 : DynamicConfiguration adds the publish and multiple get configuration methods * Polish #4120 : To add DynamicConfiguration implementation for Zookeeper * Polish #4121 : Add the mapping from service metadata to service name * Polish apache/incubator-dubbo/#3790 : Dependencies with no license * Polish #4071 : @reference can't match the local @service beans * Update version to be 2.7.3 * Polish #3946 : Add thread-safe and performance optimization * Polish #3946 : Add thread-safe and performance optimization * Polish #3946 : Add thread-safe and performance optimization * Update 2.7.3 * Polish #4104 : To add more events for dubbo-config-api * Polish #3942 : Dubbo Cloud Native: To Add Service registration and discovery abstract * Polish #3984 : Add Service registration and discovery implementation for Zookeeper * Add Bootstrap * Polish GA * Polish #4050 : Dubbo Cloud Native : Add a mechanism to upgrade Dubbo services smoothly * Polish #4093 : To add DubboServiceDestroyedEvent * Polish #4050 : Dubbo Cloud Native : Reactor * Polish #3946 : Remove SPI * Polish #4265 : [Feature] Dubbo Cloud Native - Add Bootstrap * Polish #4265 : [Feature] Dubbo Cloud Native - Add Bootstrap * Polish #4265 : Add test dependencies * Polish /#3942 : Refactor implementation * Polish #3984 : Refactor * Add Nacos implementation * Polish #3984 : Add Nacos implementation * Polish #4268 : Dubbo Event - To support Generic event type handle * Polish #4268 : Update JavaDoc * Polish #4268 : Add GenericEventListener implementation * add cache for MetadataServiceProxy * support multiple metadata and configcenter * unify metadata implementation * add missed files * remove duplicated files * add new SPIs and modules to dubbo-all pom.
Abstract
Dubbo Cloud Native requires an abstract for Service registration and discovery that will support Dubbo application as a whole service registering to a registry instead of Dubbo service interfaces.
Concepts
It will introduce some new concepts:
Dubbo Service name(a.k.a Dubbo Application name)
The name of Dubbo application is unique in the current application and the registry, which could be configured by the externalized property
dubbo.application.name
or set byApplicationConfig
directly.Dubbo Service instance
The minimum Dubbo registration unit must include:
Dubbo Service registry
Being different from the traditional Dubbo registry, Dubbo Application registry only accepts current Dubbo applications' registration, is like Spring Cloud Registry, and the metadata of Dubbo services will reside in their self-application.
Dubbo Service discovery
It provides a mechanism to discovery Dubbo applications and Dubbo Service interfaces.
The text was updated successfully, but these errors were encountered: