-
Notifications
You must be signed in to change notification settings - Fork 58
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
[DISCUSS] Client implementation (Rest High LevelClient vs OpenSearch Java client) for Extensibility #294
Comments
A full reading of opensearch-project/opensearch-java#262 should also be conducted before considering the above options. |
@dblock @reta @dbwiddis @saratvemulapalli need your input here. Thanks! |
If we frame this decision based on what would be the right path forward, rather than the easier path forward, I would be partial to java-client. The genesis of extensibility was to provide isolation for extensions, and thus bringing in OpenSearch as a dependency for extensions would be antithetical to our original goal. Additionally, the eventuality for other plugins to migrate over to java-client and for the rest-client to be deprecated later on would require us to later migrate over anyways. |
Agree with @joshpalis, we also have a quorum on 2 things:
The picture at large: the |
Agree with @joshpalis and @reta. |
I don't disagree with the previous replies, but I think the initial question is asking about the "near term" way forward for plugin migration:
I think the agreement is unanimous that we will eventually move to Background of this discussionThere are multiple simultaneous work streams going on with developing extensions.
As far as the migration of plugins, there are two distinct portions of that:
We have been taking great pains to try to keep the extension point implementation as similar as possible (same-named methods, etc.) to maximize re-use of existing code. However, changing the client in the Rest Handlers is not permitting very much code re-use, and the refactored code looks very different. We chose to migrate the Further, the work is incredibly inefficient, both now and (I foresee) in the future. We have only a few people trying to understand the inner workings of code on a plugin supported by a different team; migrate them to a new client (which is complex to do) and then we are expected to hand it back to this other team to maintain the migrated code that they didn't write, leading to more inefficiencies. Current statusHLRC is on a path to deprecation, but a longer path, per opensearch-project/OpenSearch#5424 where @reta and @dblock seemed to concur:
This is also not just a "let's wait". There are capabilities that do not yet exist in the Java Client. From this comment by @dlvenable:
My thoughtsWhile I think migrating the main plugin interface and extension points is well within the capability of the developers focusing on There is certainly value in the My strong preference is:
|
Agree with @dbwiddis and thanks everyone for putting a fair point for the clients above. For extensibility our main aim is to provide plugin owners with minimal changes to convert the plugin into an extension (Basically, using the extension points API from SDK rather overriden extension points from OpenSearch). If we have a hard requirement of using a java client instead of RHCL, it will create more questions for the migration. Coming back to the deprecation of RHCL, it will be best if plugin owners handles the migration from RHCL to Java Client as the teams are already familiar with the functionalities. We can work together with them to help with the migration. Whenever the migration is complete instead of using RHCL they will be able to use SDKClient(Java Client) from SDK and thus converting the plugin back to extension with minimal changes. |
+1 I think we are are in quorum that I like @dbwiddis's suggestion, lets move on with High Level Rest Client in the SDK as one of the client options. In the meantime though the TL;DR My Thoughts
|
Thanks @saratvemulapalli ... TLDR of all the above, there are essentially three directions forward:
|
Sorry for jumping late here. I'll throw my 0.02c :) For a project like extensions I would do whatever hard work is required to not take a dependency on OpenSearch code earlier rather than later. This probably means picking up some of the work in opensearch-java for the folks working on extensions. Finally, I think it's acceptable to take a dependency on OpenSearch for a demo, debatable/borderline to do it for an experimental feature, and I rather strongly believe is a hard no for a GA release. |
Re-opened this based on @dblock comment above and wanted to update on where we're going with this:
|
What/Why
What are you proposing?
As we are working towards converting AnomalyDetector plugin into AnomalyDetector(AD) Extension, we are using OpenSearch Java client to make REST API calls from AD Extension to OpenSearch. We have finished the first feature of AD i.e. Create Detector using the same.
The AD plugin uses High Level Rest client and the whole plugin is written based on a parser model (XContent) whereas Java client uses JSON model. Migrating this model to Java Client causes issue such as: opensearch-project/opensearch-java#297 and opensearch-project/opensearch-java#257. These issues are blocking us from proceeding with the next set of features of AD.
This issue will talk about the pros/cons of both the clients to move forward for Extensibility:
High Level Rest client (present in OpenSearch):
Pros:
Cons:
OpenSearch Java Client:
Pros:
Cons:
If we move forward with Rest High level client, the migration would be much easier but eventually in the future we need to migrate to Java Client. Until then Java Client will be in the good shape to incorporate the above issues which is blocking the current work of AD Extension.
The text was updated successfully, but these errors were encountered: