-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
docs(memorystore): added valkey caching demo application #9988
base: main
Are you sure you want to change the base?
docs(memorystore): added valkey caching demo application #9988
Conversation
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.
Hi @dackers86 and reviewers,
I'm currently reviewing this pull request and will post my full review in a few minutes. In the meantime, here's a quick summary of the changes for you and other reviewers to get up to speed:
This pull request adds a new demo application that showcases Valkey caching with a Spring Boot application. The application interacts with a PostgreSQL database and uses Valkey as an in-memory cache to improve performance.
Here's a breakdown of the changes:
- New directory:
memorystore/valkey/caching/demo
added, containing the complete demo application. - README.md: A comprehensive README file was added, detailing how to run the application locally using Docker Compose, and how to deploy it to Google Cloud Run (both with a solo API and a web app + API).
- .gitignore: A comprehensive
.gitignore
file was added to theapp
directory to ignore various build artifacts and IDE-specific files. - Dockerfile: A
Dockerfile
was added to theapp
directory to build a Docker image for the application. - docker-compose.yaml: A
docker-compose.yaml
file was added to theapp
directory to simplify the local development setup. - init.sql: An
init.sql
script was added to theapp
directory to create the necessary database tables. - pom.xml: The
pom.xml
file was updated to include dependencies for Spring Boot, Jedis (Redis client), PostgreSQL JDBC driver, and other necessary libraries. - Java files: Several Java files were added or modified, including
DataController
,HomeController
,Item
,ItemController
,ItemsRepository
,JdbcConfig
,JedisConfig
, andMain
, implementing the core logic of the caching demo application. - static/script.js: A JavaScript file was added to the
static
directory to handle the frontend interactions with the API. - templates/index.html: An HTML template was added to the
templates
directory to provide a user interface for the application. - sample-data directory: A
sample-data
directory was added, containing aDockerfile
,docker-compose.yaml
, andpom.xml
to create sample data for the application.
The checklist in the PR description indicates that all required tests and lint checks have passed.
I'll provide a more detailed review shortly.
And now, a little haiku to brighten your day:
Cache speeds up the code,
Data flows with graceful ease,
Reviews now are fun!
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 pull request adds a demo application showcasing Valkey caching with Memorystore. The documentation and code are well-structured and cover various aspects of setup and deployment. However, there are a few minor improvements that can enhance clarity and user experience.
I've summarized the Google Java Style Guide elements used in this review below:
- Javadoc: Ensured Javadoc comments are present for classes and public methods, providing clear descriptions of their purpose and usage.
- Naming Conventions: Checked for consistent and descriptive names for classes, methods, and variables.
- Constant Variables: Verified the use of uppercase with underscores for constant variables.
- Comments: Recommended adding comments to explain complex logic or non-obvious code segments.
- Error Handling: Suggested improvements for error handling and validation to prevent unexpected behavior.
Description
Fixes #
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
pom.xml
parent set to latestshared-configuration
mvn clean verify
requiredmvn -P lint checkstyle:check
requiredmvn -P lint clean compile pmd:cpd-check spotbugs:check
advisory only