opensearch-project / opensearch-benchmark

OpenSearch Benchmark - a community driven, open source project to run performance tests for OpenSearch
https://opensearch.org/docs/latest/benchmark/
Apache License 2.0
111 stars 77 forks source link

Enable OSB to use clients other than the standard Python client #419

Open gkamat opened 11 months ago

gkamat commented 11 months ago

Description

Currently, OSB is tied to using opensearch-py, the standard Python client for OpenSearch. However, there are several other clients including the Java client, Rust client, Ruby client, etc. Each of these comes in different versions as well. There is interest in understanding how these clients compare vis-a-vis performance. To permit this, OSB needs to be be enhanced to encapsulate its client access mechanism.

saimedhi commented 11 months ago

Hey @gkamat, I'd love to work on this issue. Could you give more details on what needs to be done and the expected outcome? Thank you.

dblock commented 10 months ago

Without looking at the code, I would begin by extracting all client operations (e.g. create an index) into some base class (e.g. Client that has a method .create_index) and reimplementing any existing functionality on top of that, keeping in mind that it should be high level enough that the implementation can be done out of process (e.g. a method that can "add a document" which would be a lot of small operations vs. "index an entire data set" which could be done by calling an out of process command line tool). Generally, Adding a new client should require implementing a new instance of this class (e.g. PythonClient) where all the implementation details can be completely hidden. I would defer adding actual support for clients such as Java for after a decent interface emerges.