ml-commons icon indicating copy to clipboard operation
ml-commons copied to clipboard

[FEATURE] ML Commons Java Rest Client

Open saratvemulapalli opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? I have a custom distribution of OpenSearch where I have ML Commons installed in its own dedicated cluter. I would like to have ML Commons Java Rest Client in order to have my application code to communicate with ML Commons for predict.

What solution would you like? As said above I would like a ML Commons rest client which can be consumed by my application and I would be happy to contribute.

I see 4 options:

  1. In addition to transport ml-client[1], another new interface will be introduced for rest client and a default implementation will be contributed.
  2. The default implementation would be a wrapper around opensearch-high-level-rest client (which is on its path to deprecation).
  3. The default implementation would be a wrapper around Apache HTTP client.
  4. OpenSearch-java which is a replacement for opensearch-high-level-rest client. Though it does not support plugins yet, contributing to https://github.com/opensearch-project/opensearch-api-specification/blob/main/spec/namespaces/ml.yaml will automatically generate a Java client (this is work in progress by @Xtansia / @dblock)

Looking at possible options, I do prefer 4., maintaining one spec and generating clients in the language of choice. In my use case, I would need opensearch-java client.

Maintainers, let me know your thoughts/feedback?

saratvemulapalli avatar Jul 30 '24 19:07 saratvemulapalli