Welcome to Cache Contest, a project designed to demonstrate various caching mechanisms and their integration with modern technologies. This project includes services built with Java, Spring Boot, and Go, utilizing different caching strategies such as Caffeine and Memcached, as well as data synchronization with PostgreSQL and Kafka.
Current Version: 0.1.0
- Java 22
- Spring Boot 3
- JPA
- PostgreSQL
- Caffeine Cache
- Kafka
- Redis
- Hazelcast
- Golang
- Memcached
Each service exposes the following endpoints for interacting with the Order entities. The API version depends on the specific caching implementation used by the service:
-
Create an Order
Endpoint: POST /v{version}/api/order
Request Body: OrderRequest object (JSON)
Response: 201 Created with the UUID of the created order -
Delete an Order
Endpoint: GET /v{version}/api/order/delete/{orderUuid}
Response: 200 OK with confirmation of deletion -
Get an Order by UUID
Endpoint: GET /v{version}/api/order/{orderUuid}
Response: 200 OK with the Order object if found, otherwise 404 Not Found
Note: Replace {version} in the endpoints with the respective version number of the service you are interacting with (e.g., /v1, /v2, etc.).
The project comprises the following services:
A simple service that implements Caffeine cache.
A service that uses Caffeine cache with database synchronization.
A service that combines Caffeine cache with Kafka for messaging.
Same service like before, but wit Redis and nothing else.
A service that leverages Hazelcast as the caching mechanism.
A common starter library for Java services, providing shared configurations and utilities.
Extra:
A Golang service that uses Memcached for caching, designed for additional testing purposes.
To get started with this project, follow the steps below:
- Java 22
- Gradle kts
- PostgreSQL
- Kafka
- Memcached
- Redis
- Clone the repository:
git clone https://github.com/yourusername/cache-contest.git cd cache-contest
Each service exposes various endpoints for interacting with the cache and performing operations. Refer to the individual service documentation for specific API details.
For any questions or inquiries, please reach out to the project maintainers or create an issue on GitHub.
Happy caching!