-
Notifications
You must be signed in to change notification settings - Fork 26
Add gRPC Java API documentation #355
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
Conversation
Summary of ChangesHello @robfrank, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Java API reference by introducing a dedicated chapter for the gRPC API. It provides developers with detailed guidance on leveraging gRPC for high-performance remote database communication with ArcadeDB, covering setup, core functionalities, and best practices to ensure efficient and robust application development. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request adds comprehensive documentation for the gRPC Java API. The structure is logical and covers essential aspects from setup to advanced usage. I've identified a few areas with inconsistencies and opportunities for improvement in the code examples to better promote best practices, particularly around resource management, consistent API usage, and code safety. My feedback aims to enhance the clarity and correctness of the provided examples.
| RemoteGrpcServer server = new RemoteGrpcServer( | ||
| "localhost", // Server hostname | ||
| 50051, // gRPC port (default: 50051) | ||
| "root", // Username | ||
| "password", // Password | ||
| true, // Use TLS/SSL (false for development) | ||
| List.of() // Additional channel credentials (if needed) | ||
| ); |
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.
The useTls parameter is set to true, but the inline comment (false for development) suggests the opposite. Furthermore, the "Complete Example" later in the document (line 568) uses false. To improve consistency and make it easier for users to run this initial example, consider changing true to false to align with the comment and the subsequent example.
RemoteGrpcServer server = new RemoteGrpcServer(
"localhost", // Server hostname
50051, // gRPC port (default: 50051)
"root", // Username
"password", // Password
false, // Use TLS/SSL (false for development)
List.of() // Additional channel credentials (if needed)
);
- Fix resource management: update thread safety example to use try-with-resources block instead of try-finally - Fix Complete Example: add proper resource cleanup with nested try-with-resources for both server and database instances - Fix useTls parameter: change true to false in initial example for development consistency with Complete Example - Fix JSON INSERT: change from sqlscript to sql for single INSERT statement as per best practices - Fix edge creation example: add hasNext() checks before calling next() to prevent NoSuchElementException - Fix INSERT statement formatting: simplify string concatenation in Complete Example to single string literal All changes align with Java best practices and improve code reliability. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
🧪 CI InsightsHere's what we observed from your CI run for dac79da. 🟢 All jobs passed!But CI Insights is watching 👀 |
This pull request adds new documentation for the gRPC API to the Java vectors chapter. The main change is the inclusion of the
java-api-grpc.adocfile, which provides reference material for using gRPC with Java vectors.Documentation update:
include::java-api-grpc.adoc[]tosrc/main/asciidoc/api-reference/java/chapter.adoc, introducing gRPC API documentation for Java vectors.