-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Move MQE codes to independent Maven module inoap-server
.
#11176
Conversation
Sonatype Lift is retiringSonatype Lift will be retiring on Sep 12, 2023, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console. |
Can you elaborate (because I have no more context, only the PR description):
Asking because it sounds nonsense to move everything into the core module just to make it "easier" to depends on, although the current modularization is a mess, I hope not to make it worse |
We are making the new alerting core. Totally changed. |
About depending on, we need an abstract data source concept(query or alerting core's memory windows) for feeding MQE. We had a discussion about whether we need a maven module, but it seems either is fine. But an OAP-level module seems unnecessary. The MQE engine implementations, for now, can't extend w/o code changes |
@Override | ||
public abstract ExpressionResult visitMetric(MQEParser.MetricContext ctx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kezhenxu94 From my reading/understanding, this is the extension point.
MQE on Query API implementation would pick query DAOs to access data from the database.
Alerting kernel will provide another implementation on this, to read data from time window based metric data.
I still don't see why MQE-related codes should go into the core module, from the point of MQE, you might say "hey we have 10000 other modules that depends on MQE and we need to reuse it", that is a perfect reason why MQE MUST NOT be in the query plugin, but it's not a reason why it should go into the core module. To me it's not only about extension/reuse codes, it's also about organizing code, code structure, readability for new contributors, and sample for future contributors, for example, how do you persuade a contributor not to put random codes into the core module if they said "I do this by referring to the existing codes, and MQE did this". One more thing, adding more codes into the core module does not only increase the granularity of the core module, but also introduces some transitive dependencies that can not be easily removed if anyone doesn't use the MQE query, and adds extra workload if anyone want to customize/extend the MQE features (e.g. add operators), they have to override the entire core module. |
As I replied, I would have no interest to argue it should be in a maven module or not. I just said it should not be an OAP module, that's all. Because it doesn't take a responsibility of an independent feature. You don't need to convince me. You asked for a context, so, I provided. You and @wankai123 could choose your preference. I am fine for both ways. |
If you want to separate codes, create a maven module, called mqe-lib for code reusing. |
OK, I'll put them in a new maven module. |
How about creating a new module in |
Sounds perfect to me |
server-core
.oap-server
.
Since we plan to use MQE in other places(such as Alarm), I moved the relevant codes to the independent Maven module, to make it easier to depend on.