Skip to content
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

Contribute qdrant java client #7

Merged
merged 2 commits into from
Dec 13, 2023
Merged

Contribute qdrant java client #7

merged 2 commits into from
Dec 13, 2023

Conversation

russcam
Copy link
Collaborator

@russcam russcam commented Dec 12, 2023

This PR contributes a java client for qdrant.

  • Gradle is used for build automation. Easy to extend with additional tasks, and fast for incremental builds.
  • A Custom gradle task downloads protos from qdrant/qdrant, based on version specified in properties, which can be passed by commandline. No need to check in versioned protos, and protos are auto patched to include java package name.
  • Project is configured with No nulls by default, NullAway, Errorprone, enforcement of JavaDocs.
  • Ability to pass a channel to the client. This allows users to configure channel credentials however they need to for their environment e.g. self-signed certs for TLS, proxies, etc.
  • Ability for the client to manage the lifetime of the channel. A singleton instance of the client would typically be created, and Spring Boot is a popular choice for DI. Being able to configure the client to shutdown the channel on close is useful, as Spring can take care of it.
  • Exposes async methods that return ListenableFuture which can be composed to form concurrent operations, or called and waited on with .get(), optionally with a timeout.
  • Exposes ability to set an overall default timeout for all calls, and optionally provide a timeout per call.
  • Client is configured with logging, all calls are debug logged, and all exceptions are error logged.
  • Overloaded methods for common operations. Some operations have many parameters that are optional, so the builder types are used.

This commit contributes a java client for qdrant.

- Gradle is used for build automation. Easy to extend with additional tasks, and fast for incremental builds.
- A Custom gradle task downloads protos from qdrant/qdrant, based on version specified in properties, which can be passed by commandline. No need to check in versioned protos, and protos are auto patched to include java package name.
- Project is configured with No nulls by default, NullAway, Errorprone, enforcement of JavaDocs.
- Ability to pass a channel to the client. This allows users to configure channel credentials however they need to for their environment e.g. self-signed certs for TLS, proxies, etc.
- Ability for the client to manage the lifetime of the channel. A singleton instance of the client would typically be created, and Spring Boot is a popular choice for DI. Being able to configure the client to shutdown the channel on close is useful, as Spring can take care of it.
- Exposes async methods that return ListenableFuture<T> which can be composed to form concurrent operations, or called and waited on with .get(), optionally with a timeout.
- Exposes ability to set an overall default timeout for all calls, and optionally provide a timeout per call.
- Client is configured with logging, all calls are debug logged, and all exceptions are error logged.
- Overloaded methods for common operations. Some operations have many parameters that are optional, so the builder types are used.
@russcam russcam requested a review from Anush008 December 12, 2023 12:12
@Anush008 Anush008 mentioned this pull request Dec 12, 2023
7 tasks
Copy link
Member

@Anush008 Anush008 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for the amazing contribution ❤️

giphy

I'll open PRs with some additions. Would really appreciate your reviews there.

@Anush008 Anush008 requested a review from KShivendu December 12, 2023 13:24
@russcam russcam merged commit c4999e3 into qdrant:master Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants