-
Notifications
You must be signed in to change notification settings - Fork 5
Spring Boot Starter for Spring Data Valkey #35
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
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
74608e0 to
808c0e7
Compare
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
808c0e7 to
90ebf88
Compare
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
5d7c89e to
453bfda
Compare
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
8b7e20b to
bbf8934
Compare
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
888cd6d to
80fa0fb
Compare
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
80fa0fb to
eb6ba88
Compare
Signed-off-by: Jeremy Parr-Pearson <[email protected]>
ikolomi
left a comment
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 PR is fairly large. I reviewed the directory structure, the rebranding changes, and the test coverage, and they all seem to match the original Spring Data Redis codebase at tag v3.5.1 exactly. Nice job.
The one major issue I’m scratching my head over is the support for enabling virtual threads via configuration. This required adding a setter for AsyncTaskExecutor on the connection factory, which I deliberately did not provided originaly. In Jedis and Lettuce, AsyncTaskExecutor is used only for cluster configurations.
With valkey-glide, however, this executor is completely ignored. As it stands, adding this configuration provides exactly zero functionality and gives the misleading impression that configuring virtual threads has an effect when using valkey-glide.
I suggest one of the following approaches:
Provide a NO-OP implementation (possibly with a WARN-level log) in the valkeyConnectionFactoryVirtualThreads bean, or
Actually use this executor to invoke .customCommand(...).get() in ClusterGlideClientAdapter and StandaloneGlideClientAdapter.
For the second option, I’d ask you to do a deeper dive to understand the benefit versus the added complexity. I would argue that support for configuring the executor is mostly a nice-to-have, since the original drivers use it only in cluster mode.
.github/workflows/ci.yml
Outdated
|
|
||
| - name: Test baseline | ||
| run: | | ||
| # Install Spring Data Valkey (used by starter) |
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.
should not the test target come before the install?
Also, why not to split the invocations into the separate steps - i will make life easire in the github UI
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.
Once we make the project multi-module this can be simplified, for now we need to manually install Spring Data Valkey before we can use the starter as it relies on Spring Data Valkey and the two modules are not connected through a parent module yet.
First test then install. Also do it in the separate steps
First package (with tests) then install. Do it in separate steps
Signed-off-by: ikolomi <[email protected]>
|
Merging as is, the virtual threads will be tracked here: #43 |
Summary
Adds a new Spring Boot starter module for Spring Data Valkey that uses Valkey GLIDE by default, plus a spring-boot example demonstrating template and repository usage.
Closes #13.
Features
The starter is based on Spring Boot Starter Data Redis 3.5.1 and provides:
Implementation
The key changes are in:
README.mdandMIGRATION.md- Updated spring-data-valkey docs and migration guide to include Spring Boot instructions.github/workflows/*- Updated CI to also build/test the Spring Boot starterexamples/spring-boot- Added Spring Boot example showing how to use the starterspring-boot-starter-data-valkey/README.md- Added docs for Spring Boot starterValkeyGlideConnectionConfiguration.java- Main class for GLIDE support (follows Lettuce/Jedis patterns) - almost all other starter classes are just rebranded copies from the Redis starterValkeyGlideConnectionFactory.java- Added connection pool executor supportLimitations
The following features are not implemented:
Testing
Completed:
What's Next
Organize the repo into a multi-module project (see #37).