-
Notifications
You must be signed in to change notification settings - Fork 932
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
Proposal for Dubbo-go registry plugins #2343
Comments
Before implementing specific development tasks, I believe we should establish a development plan. Below is a rough outline I have prepared based on recent meeting discussions:
Objectives:
落实到具体的开发工作之前,我认为我们应该确定一个开发计划,下面是我结合最近的会议内容整理出的大致方案:
目标:
|
I can't agree more. The first plugin we are going to refactor is Polaris registry. The first thing is to define the registry interface. @jasondeng1997 @ev1lQuark Could you elaborate more details about your work? In my option, the type Registry interface {
Register()
Unregister()
GetService()
ListServices()
Watch()
} EDIT1: This is at a very early stage. We should discuss the feasibility of this design first, and then we can continue to further enrich the details. We should maintain both the old registry and the new registry for a while until we confirm that the new one functions properly. |
What are the benefits of this change |
Don't you think the current subscribing model is too heavy to maintain? We have tons of concepts, like "Directory", "Node", etc. The objective is to streamline our framework, not just by moving the code outside Dubbo-go, but also by simplifying the design. EDIT1: Btw, we need a more modern architecture. To achieve this, it requires to give up some out-of-date and over-complex concepts and architectures. |
I agree with you about simplifying the design and using list-and-watch model. For now, RegistryDirectory is responsible for caching and filtering. Maybe we could split these two parts? For caching part, turn RegistryDirectory into RegistryCache. RegistryCache also needs to implement Registry interface and is responsible for processing events from the registry with starting a loop. For filtering part, Directory implementation class relies on Registry interface directly. |
when will this Proposal publish |
This is in planning stage. We don't confirm the time those features are available. So stayed tuned. If you are interested, please feel free to let me know. |
As of today, Dubbo-go has become a powerful RPC Golang library. However, it is a heavy and complex framework. The Dubbo-go team is working on simplifying the architecture.
We are planning to introduce Dubbo-go plugins, see apache/dubbo-go-contrib. The core library, this repo, defines interfaces for key capabilities such as the registry and config center. The plugins will be installed on demand and will be responsible for providing specific implementations based on these interfaces.
Here is a snippet of pseudocode that gives an example of starting a server:
With this architecture, functionalities that users don't depend on are not imported and do not affect the user's business. Additionally, we are planning to refactor the API exposed to the users to make it more user-friendly. Our team will focus on improving stability, maintainability, and user experience.
The proposal for plugins can be referenced to #2326.
Please leave a comment if you have any ideas or would like to contribute.
The text was updated successfully, but these errors were encountered: