JPA Caching With Hazelcast, Hibernate, and Spring Boot
An in-memory data grid is an in-memory distributed key-value store that enables caching data using distributed clusters. Do not confuse this solution with an in-memory or NoSQL database. In most cases it is used for performance reasons — all data is stored in RAM not in the disk like in traditional databases. The first time I started working with an in-memory data grid, we were considering moving to Oracle Coherence. The solution really made me curious. Oracle Coherence is obviously a paid solution, but there are also some open-source solutions, among which the most interesting seem to be Apache Ignite and Hazelcast. Today, I’m going to show you how to use Hazelcast for caching data stored in the MySQL database accessed by Spring Data DAO objects. Here’s the figure illustrating the architecture of the presented solution.
Here’s how to implement our solution.
via DZone.com Feed https://dzone.com
May 24, 2017 at 03:30PM