-
Notifications
You must be signed in to change notification settings - Fork 423
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
Basic abstraction for data-source extension #58
Comments
About the design of
Follow this idea, I have an implementation as a reference: gorexlv@562532a After One small suggestion, looking forwarding more ideas. |
A little question: whether each *RuleManager needs a separate datasouce instance? |
Here is the Draft Design about datasource extension framework: https://github.com/alibaba/sentinel-golang/wiki/Dynamic-DataSource-Extension-Framework-Design(DRAFT) Discussions are welcomed. |
From my perspective, in current design, rules channel of xxx_manager.go might be redundant. There are some reasons:
Discussions are welcomed. |
From my perspective, through one type dynamic data source to update Manager's rules need one datasource instance. And different types of data source property updates should not be coupled together. There are some special scenario:
Discussions are welcomed. |
:) |
@gorexlv My idea about your replies:
It's important to emphasize that your idea about avoiding to pass interface{} parameter is very helpful. |
I think we should have a detailed design document to illustrate the idea. Please let me know If you have any suggestion about my design, [dynamic data source extension design(DRAFT)](https://github.com/alibaba/sentinel-golang/wiki/Dynamic-DataSource-Extension-Framework-Design(DRAFT, WIP)), |
Yes. Mechanically, one data-source, multi rule manager should be supported, or not be forbidden at least. Strategically, one data-source to one rule manager would be ok in current, in order to compatible with Java design. But some redundancy for the future is necessary.
Thank you for your work. I'm a little confused about the design of PropertyHandlePair, but it would be nice if there are some codes to help me understand. :) |
Thanks for reaching out.
From my point of view, a machine sharing a connection doesn't solve this problem, but it coupling the code. For this scenario, we may need another solution to optimize it. The latest wiki: https://github.com/alibaba/sentinel-golang/wiki/Dynamic-DataSource-Extension-Framework-Design(DRAFT) |
Actually Sentinel does not restrict how users parse the data from the config center, so it's okay to put all kinds of rules together in the same |
@louyuting thanks for your work. here is a simple question: https://github.com/alibaba/sentinel-golang/pull/73/files#r386189522. I provided a simple resolution in #74 and associated commit, hope it makes some sense.
@louyuting In a large cluster, the benefits of removing a long connection are objective, especially to the push performance of etcd server. but maybe not significant for other datasouce, such as file. Some humble opinions, but I don't insist on it. Looking forwarding a good trade-off :)
@sczyh30 thanks, I'll have a try. |
Thanks for reaching out~ |
here is my implementation: gorexlv@562532a I haven't PR it yet, because I'm not satisfied with some things. But I hope it helps :) |
That's very great. I'll take a closer look.
Your suggestion is very helpful. And I had replied some comments. I am looking forward to your reply. |
@louyuting Sorry maybe my replies are not clear. I'll try to explain.
I think DataSource-side is more closer to java design.
I agree with the draft. But I pay more attention to some details, and how to follow java design which is important for code iteration and maintains. I update my implementation: gorexlv@b4c7ec5. I think it partially solves the generics-lack problem in golang, and is close to java design, hopes it helps! But actually I am still confused with :) |
How about explicitly define a RuleManager struct? Maybe a little bit better :) |
In fact, following java design is not recommended. We should follow golang style design. Now, there's some redundancy in the design of Java. I think we should design more clearly in golang and then refactor the Java version in the future. Thanks |
|
Anyway, looking forward to releasing ASAP :) |
any progress? We look forward to introducing it into our libraries :) |
Discussion is going on. Thanks. |
Resolved in #73. If you have any other suggestions, feel free to discuss with the community :) |
Issue Description
Type: feature request
Describe what feature you want
Define datasource extension framework
implement FileRefreshableDataSource
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: