Search code examples
javacluster-computingdistributed-computingdistributed-cachinghazelcast

Would using Hazelcast for storing global constants be considered an abuse?


I've been using Hazelcast recently and because I quite like it, I'm at the risk of succumbing to The Law of the Instrument , or "to a hammer all problems are nails"

I'm wondering about how ridiculous it would be to store static final data, such as the list of countries for a web app because it is a kind convenient/lazy way to make it happen.

Given that HazelCast's design goal is really for distributed mutative state how appalling an idea would this really be and why?


Solution

  • If your static data doesn't fit in a single JVM memory then you can consider storing in Hazelcast but for small amount of data it will be over-engineering. Keep things local if you can to avoid the cost of possible serialization, networking, clustering etc.

    founder@hazelcast