-
Notifications
You must be signed in to change notification settings - Fork 70
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 update readme #636
Java update readme #636
Conversation
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
java/README.md
Outdated
1. A Java client (lib folder): wrapper to rust-client. | ||
2. An examples script: to sanity test javababushka and similar java-clients against a redis host. | ||
3. A benchmark app: to performance benchmark test javababushka and similar java-clients against a redis host. | ||
Tested on Amazon Corretto version 11.0.21, and 17.0.3 |
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.
GHA uses Timurin SDK, you can referenct it too.
Mention which OS was tested on.
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.
fixed in 2864a6e
java/README.md
Outdated
- JDK 11+ | ||
- git | ||
- protoc (protobuf compiler) | ||
- Gradle |
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.
gradle is not needed since we have gradlew
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.
fixed in 2864a6e
java/README.md
Outdated
- JDK 11+ | ||
- git | ||
- protoc (protobuf compiler) | ||
- Gradle |
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.
But rust is 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.
Good point... let me add it.
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.
fixed in 2864a6e
java/README.md
Outdated
sudo apt-get install openjdk-11-jdk | ||
VERSION=8.3 | ||
wget https://services.gradle.org/distributions/gradle-${VERSION}-bin.zip -P /tmp | ||
sudo apt install -y protobuf-compiler |
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.
sudo apt-get install openjdk-11-jdk | |
VERSION=8.3 | |
wget https://services.gradle.org/distributions/gradle-${VERSION}-bin.zip -P /tmp | |
sudo apt install -y protobuf-compiler | |
sudo apt-get install -y protobuf-compiler openjdk-11-jdk openssl gcc |
last two are needed for rust and building rust dependencies
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.
fixed in 2864a6e
java/README.md
Outdated
* `./gradle :client:test` to run client unit tests | ||
* `./gradle :client:spotlessCheck` to check for codestyle issues | ||
* `./gradle :client:spotlessApply` to apply codestyle recommendations | ||
* `./gradle :benchmarks:run` to run performance benchmarks |
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.
* `./gradle :client:test` to run client unit tests | |
* `./gradle :client:spotlessCheck` to check for codestyle issues | |
* `./gradle :client:spotlessApply` to apply codestyle recommendations | |
* `./gradle :benchmarks:run` to run performance benchmarks | |
* `./gradlew :client:test` to run client unit tests | |
* `./gradlew :client:spotlessCheck` to check for codestyle issues | |
* `./gradlew :client:spotlessApply` to apply codestyle recommendations | |
* `./gradlew :benchmarks:run` to run performance benchmarks |
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.
fixed
$ ./gradle :client:test | ||
BUILD SUCCESSFUL | ||
``` | ||
|
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.
integTest
?
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.
We can add it later
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 think it will be fine after Yury's comments have been addressed.
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
java/README.md
Outdated
|
||
## Organization | ||
The beta release of Babushka was tested on Intel x86_64 using Ubuntu 22.04.1, and amd64 using macOS 14.1. |
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 Java wrapper won't be ready for the beta release, but we would have the java folder in the repository when we go public. So the README file should explain that the wrapper isn't ready yet and still a work in progress.
Lets remove the System Requirements, and avoid from saying that the java client was tested or is a part of the beta release - and instead lets add a Current Status section, explaining where we at.
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.
Ok thanks. I've updated it, but please let me know what you think.
java/README.md
Outdated
|
||
## Code style | ||
At the moment, the beta release of Babushka mush be build from source. |
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.
it's not in beta yet, so it has to be built from source and not from package managers. lets change this sentence
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.
Thanks. Please take a look at the updates if you can.
java/README.md
Outdated
Client testClient = new Client(); | ||
|
||
public RedisClient() { | ||
testClient.asyncConnectToRedis("localhost", 6379, false, false).get(); // expect 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.
I would expect to have a constructor only with host and port, so the user won't have to pass 'false' flags
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.
Right. We have to implement that, but I've updated the readme to reflect what we want.
updated in eb00378
java/README.md
Outdated
|
||
public RedisClient() { | ||
testClient.asyncConnectToRedis("localhost", 6379, false, false).get(); // expect Ok | ||
Response setResponse = testClient.asyncSet("name", "johnsmith").get(); // expect 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.
minor: lets stick to 'foo', 'bar', to match the other readmes
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 used "key", "foobar".
java/README.md
Outdated
|
||
Client testClient = new Client(); | ||
|
||
public RedisClient() { |
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.
Can we remove the class and only include the client example, same as they do in Lettuce and Jedis?
https://github.com/lettuce-io/lettuce-core#basic-usage
https://github.com/redis/jedis#connecting-to-a-redis-cluster
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.
removed in eb00378
java/README.md
Outdated
public RedisClient() { | ||
testClient.asyncConnectToRedis("localhost", 6379, false, false).get(); // expect Ok | ||
Response setResponse = testClient.asyncSet("name", "johnsmith").get(); // expect Ok | ||
Response getResponse = testClient.asyncGet("name").get(); // expect "johnsmith" |
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.
maybe instead of adding as a comment, we can do same as lettuce did:
setResponse == "OK"
getResponse == "bar"
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.
updated in eb00378
java/README.md
Outdated
* `host`: redis server host url | ||
* `port`: redis server port number | ||
* `tls`: redis TLS configured | ||
|
||
### Troubleshooting |
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 troubleshooting is not specific for Java. We will add a general troubleshooting to the main wiki later on. Lets remove it from the Java README
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.
removed in eb00378
java/README.md
Outdated
``` | ||
3. Generate protobuf files: | ||
```bash | ||
$ cd java/ |
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.
IMO removing the '$' and therefore also the 'BUILD SUCCESSFUL' will make it easier for users to copy the code to their terminals
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.
updated in eb00378
Signed-off-by: Andrew Carbonetto <[email protected]>
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.
Overall looks good! Let's wait for our PM to approve the status message and then ship it
java/README.md
Outdated
This module contains a Java-client wrapper that connects to the `Babushka`-rust-client. The rust client connects to | ||
redis, while this wrapper provides Java-language binding. The objective of this wrapper is to provide a thin-wrapper | ||
language api to enhance performance and limit cpu cycles at scale. | ||
## Wrapper Status |
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.
Notice: Java Wrapper - Work in Progress
We're excited to share that the Java client is currently in development! However, it's important to note that this client is a work in progress and is not yet complete or fully tested. Your contributions and feedback are highly encouraged as we work towards refining and improving this implementation. Thank you for your interest and understanding as we continue to develop this Java wrapper.
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.
Lets wait for Mickey, Asaf and Shachar to approve
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.
Approved :)
Signed-off-by: Andrew Carbonetto <[email protected]>
Issue #, if available: N/A
Description of changes:
Update the Java Client README.md to conform with other languages README templates.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.