-
Notifications
You must be signed in to change notification settings - Fork 69
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
Java: Add ExamplesApp and Update benchmarkingApp to both have Java/Glide-for-redis client #896
Java: Add ExamplesApp and Update benchmarkingApp to both have Java/Glide-for-redis client #896
Conversation
System.out.println("Run LETTUCE async client"); | ||
testClientSetGet(LettuceAsyncClient::new, runConfiguration, true); | ||
break; | ||
case GLIDE: | ||
System.out.println("GLIDE for Redis async not yet configured"); | ||
System.out.println("Run GLIDE async client"); |
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.
woohoo
does it run in CI?
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.
No. Does it need to?
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.
https://github.com/aws/glide-for-redis/blob/main/.github/workflows/java-benchmark.yml
It runs on demand only. Can you trigger it and validate that it works?
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.
https://github.com/Bit-Quill/glide-for-redis/actions/runs/7841103142
fails to compile using protoc.
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.
Oh you need to add protobuf installation to benchmarking CI
Please update it to let CI pass and generate numbers.
java/benchmarks/src/main/java/glide/benchmarks/clients/glide/GlideAsyncClient.java
Outdated
Show resolved
Hide resolved
java/examples/src/main/java/glide/examples/clients/GlideClient.java
Outdated
Show resolved
Hide resolved
java/benchmarks/src/main/java/glide/benchmarks/clients/glide/GlideAsyncClient.java
Outdated
Show resolved
Hide resolved
java/benchmarks/src/main/java/glide/benchmarks/clients/glide/GlideAsyncClient.java
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,25 @@ | |||
plugins { |
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.
examples should be under the ${root}/examples
folder, not under the java
folder. This reduces the user's ability to find the app.
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.
This adds difficulties on dependency resolution (line 12), until java client released to maven.
But I think it is possible to commit a directory symlink. @acarbonetto can you try this?
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.
I will try.
Ultimately, we want to be able to create a distribution JAR, and at that point a separate gradle project may be fine.
java/benchmarks/src/main/java/glide/benchmarks/clients/glide/GlideAsyncClient.java
Outdated
Show resolved
Hide resolved
|
||
@Override | ||
public CompletableFuture<String> asyncSet(String key, String value) { | ||
return redisClient.customCommand(new String[] {"Set", key, value}).thenApply(r -> "Ok"); |
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.
why do you modify the returned value?
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.
Previous iterations of the client returned null.
This is no longer true, and now the client returns "OK".
Fixed.
I pulled this PR, ran
|
ceb0144
to
ceaa793
Compare
It didn't build the rustn library. I have added a dependency on the run task to compile rust release first. This should now work out of the box. I ran:
and got:
...note: I'll remove the examples:run :D from the install_and_test script. |
java/benchmarks/src/main/java/glide/benchmarks/clients/glide/GlideAsyncClusterClient.java
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,25 @@ | |||
plugins { |
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.
This adds difficulties on dependency resolution (line 12), until java client released to maven.
But I think it is possible to commit a directory symlink. @acarbonetto can you try this?
java/benchmarks/src/main/java/glide/benchmarks/clients/glide/GlideAsyncClient.java
Outdated
Show resolved
Hide resolved
java/benchmarks/src/main/java/glide/benchmarks/clients/glide/GlideAsyncClient.java
Outdated
Show resolved
Hide resolved
java/benchmarks/src/main/java/glide/benchmarks/clients/glide/GlideAsyncClient.java
Outdated
Show resolved
Hide resolved
java/benchmarks/src/main/java/glide/benchmarks/clients/glide/GlideAsyncClient.java
Outdated
Show resolved
Hide resolved
java/examples/src/main/java/glide/examples/clients/GlideClient.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
2fa01c2
to
2259992
Compare
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
|
||
System.out.println("SET(apples, oranges): " + client.set("apples", "oranges").get()); | ||
System.out.println("GET(apples): " + client.get("apples").get()); | ||
|
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.
Is it worth adding an example with an error?
Issue #, if available:
Description of changes:
Add the Glide async client to the BenchmarkApp for the
install_and_test
script.Add the ExamplesApp for manually testing custom commands.
Out of scope
Glide async client doesn't have cluster-mode client linked (TODO).
ExamplesApp runs only custom command (no transactions, no specific commands - TODO).
Examples:
To run benchmark app, run:
To run examples app, run:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.