Ehcache
Redisson
Our great sponsors
Ehcache | Redisson | |
---|---|---|
3 | 3 | |
1,957 | 22,706 | |
0.8% | 1.3% | |
5.6 | 9.9 | |
6 days ago | 1 day ago | |
Java | Java | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Ehcache
-
GC, hands off my data!
I decided to start with an overview of what open-source options are currently available. When it comes to the implementation of the on-heap cache mechanism, the options are numerous – there is well known: guava, ehcache, caffeine and many other solutions. However, when I began researching cache mechanisms offering the possibility of storing data outside GC control, I found out that there are very few solutions left. Out of the popular ones, only Terracotta is supported. It seems that this is a very niche solution and we do not have many options to choose from. In terms of less-known projects, I came across Chronicle-Map, MapDB and OHC. I chose the last one because it was created as part of the Cassandra project, which I had some experience with and was curious about how this component worked:
-
Counting faster with Postgres
If the application is a simple two-tier app with only UI and some form of backend, then we can use a caching layer such as EH Cache or Cache tools to maintain the count of rows as and when we insert it. These caches can be backed by persistence so that the data is not lost. Caches are lightweight and pretty fast. Alternatively, one can store the count in the database itself. The key feature of this approach is that the trigger to update the count is the application's responsibility.
-
Resume Advice Thread - June 19, 2021
"EHCache" is formally "Ehcache".
Redisson
-
Kotlin Spring WebFlux, R2DBC and Redisson microservice in k8s 👋✨💫
Source code you can find in the GitHub repository. he main idea of this project is the implementation of microservice using Kotlin, Spring WebFlux, PostgresSQL, and Redis with metrics and monitoring and deploying it to k8s. For interacting with PostgresSQL we will use reactive Spring Data R2DBC and for Redis caching using Redisson.
-
Am I overlooking any potential issues that could arise from my implementation?
I came up empty handed in search of an alternative to Quartz for scheduling Crons in a clustered/distributed environment. Redisson has a scheduler, but it came with its own issues: - https://github.com/redisson/redisson/issues/4020 - https://github.com/redisson/redisson/issues/3991 - https://github.com/redisson/redisson/issues/4321
-
Implement Hibernate 2nd level Cache with Redis, Spring Boot, and Spring Data JPA
4. We use the open-source library Redisson to connect to Redis instance and use Redis as Hibernate 2nd level cache. Please see their Github repo for more information.
What are some alternatives?
Caffeine - A high performance caching library for Java
Jedis - Redis Java client
Hazelcast - Hazelcast is a unified real-time data platform combining stream processing with a fast data store, allowing customers to act instantly on data-in-motion for real-time insights.
Vert.x - Vert.x is a tool-kit for building reactive applications on the JVM
Chronicle Map - Replicate your Key Value Store across your network, with consistency, persistance and performance.
Apache ZooKeeper - Apache ZooKeeper
MapDB - MapDB provides concurrent Maps, Sets and Queues backed by disk storage or off-heap-memory. It is a fast and easy to use embedded Java database engine.
Apache Geode - Apache Geode
Hystrix - Hystrix is a latency and fault tolerance library designed to isolate points of access to remote systems, services and 3rd party libraries, stop cascading failure and enable resilience in complex distributed systems where failure is inevitable.
Dropwizard Circuit Breaker - A circuit breaker design pattern for dropwizard