SharedHashMap vs Redis
Join the DZone community and get the full member experience.
Join For FreeOverview
This is a comparison between OpenHFT's SharedHashMap and a popular key-value store Redis.
Any vendor will tell you how great their product is, so I will start by outlining why you wouldn't use SharedHashMap, before I tell you why it is a "must have" for performant applications.
Why you would use Redis?
Redis is a more mature database, relatively widely used and it includes;
- Support for multiple languages.
- Access over TCP to remote clients.
- A command line management tool.
- It out performs many other key-value stores.
Why you would use OpenHFT's SharedHashMap?
Why does SharedHashMap out perform Redis?
- It acts as an embedded data store, even across multiple process. You don't pay the price of TCP messaging via the kernel.
- It was designed to be used in Java in a pause less, garbage free manner.
- It is written in Java, for Java.
But C is faster than Java?
How much difference does it make?
Setting millions of key-values on a 16 core server with 128 GB of memory.
Redis | SharedHashMap | |
---|---|---|
Single threaded | ~10K updates/sec | ~3M updates/sec |
Multi-threaded | ~100K updates/sec | ~30M updates/sec |
Conclusion
Published at DZone with permission of Peter Lawrey, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Trending
-
Docker Compose vs. Kubernetes: The Top 4 Main Differences
-
Hiding Data in Cassandra
-
Constructing Real-Time Analytics: Fundamental Components and Architectural Framework — Part 2
-
10 Traits That Separate the Best Devs From the Crowd
Comments