-
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 session demo application #10004
base: main
Are you sure you want to change the base?
docs(memorystore): added valkey session demo application #10004
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 team,
I'm currently reviewing this pull request and will provide my feedback shortly. In the meantime, here's a summary of the changes for you and other reviewers to quickly get up to speed:
This pull request adds a new demo application for session management using Valkey. The application demonstrates how to use Valkey as an in-memory store for user tokens. The changes include:
- New demo application: A complete Spring Boot application demonstrating session management with Valkey and PostgreSQL.
- README.md: A comprehensive README file explaining how to run the application locally (with and without Docker) and how to deploy it to Google Cloud using Terraform. This includes detailed instructions for setting up the database, Valkey server, and deploying to Cloud Run. The README also lists all the application's endpoints.
- .gitignore: A new
.gitignore
file added to theapp
directory to ignore generated files and directories. - Dockerfile: A
Dockerfile
for building a Docker image of the application. - docker-compose.yaml: A
docker-compose.yaml
file for running the application and its dependencies (Valkey and PostgreSQL) using Docker Compose. - init.sql: An SQL script for creating the necessary database tables.
- main.tf: A Terraform configuration file for deploying the application to Google Cloud.
- Several Java files: New Java classes implementing the application's logic, including controllers for authentication and basket management, data access objects, and utility classes. These files are well-structured and use Spring Boot conventions.
The application uses Valkey for session management, PostgreSQL for user accounts, and Thymeleaf for templating. It includes features for user registration, login, logout, token verification, and a simple shopping basket. The application is well-documented and easy to understand.
I'll be checking the following aspects during my review:
- Code quality and style
- Security best practices
- Error handling and robustness
- Test coverage
- Deployment instructions and infrastructure setup
I'll provide a more detailed review in a few minutes. Until then, happy reviewing!
Small code, big impact,
Valkey's speed, a new act,
Sessions now so swift.
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 session management demo application using Valkey. The application uses Spring Boot, PostgreSQL, and Valkey for session management. The documentation provides clear instructions for running the application locally, with Docker, and deploying to Google Cloud. The code is generally well-structured and follows good practices. Here are a few suggestions for improvement based on commonly used style guides and best practices for Java and related technologies:
Summary of Style Guide Elements Referenced:
- Javadoc Comments: Ensuring comprehensive Javadoc comments for all public classes and methods.
- Naming Conventions: Following standard Java naming conventions for variables, methods, and classes.
- Error Handling: Validating user inputs and providing informative error messages.
- Security Best Practices: Protecting against common vulnerabilities like SQL injection and storing passwords securely.
- Dependency Management: Using appropriate and up-to-date dependencies.
- Testing: Encouraging thorough unit and integration testing.
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