Exploring Hazelcast With Spring Boot
For the use cases I am going to describe here, I have two services: courses-service and reviews-service:
- Courses-service provides CRUD operations for dealing with courses and instructors.
- Reviews-service is another CRUD operations provider for dealing with reviews for courses that are completely agnostic of courses from courses-service.Â
Both apps are written in Kotlin using Spring Boot and other libraries. Having these two services, we are going to discuss distributed caching with Hazelcast and Spring Boot and see how we can use user code-deployment to invoke some code execution via Hazelcast on a service.Â
Spoiler alert: The examples/use cases presented here are designed purely for the sake of demonstrating integration with some of Hazelcast’s capabilities. The discussed problems here can be solved in various ways and maybe even in better ways, so don’t spend too much on thinking, “why?” So, without further ado, let’s dive into code.