Skip to content
raffaeleguidi edited this page Sep 6, 2011 · 2 revisions

What is a good DirectMemory use case?

Every situation where you have large java objects or binary data to store in memory that need to be cached for fast retrieval is a good fit for DirectMemory. Remember, your java objects would be serialized in memory and can't be directly used without deserialization - off-heap memory, for java, is like a file - just way faster

Why would one use DirectMemory over, say, a pool of memcached servers? What are the advantages?

You can see DirectMemory as a local memcached - no network overhead, no install, simpler to manage. I know, memcached IS simple, but with DirectMemory you have nothing to manage :) In any case any good fit for (not clustered)memcached+java is potentially an even better fit for DirectMemory

I'm using OSCache (or another old caching system) and I have a lot of problems with the heap, a lot of OutOfMemory exceptions and. Can DirectMemory help?

You probably have OSCache (or whatever) problems, not heap problems and would probably benefit to a switch to a more modern cache (ehcache is a good choice but in some scenarios memcached could fit as well)

I like DirectMemory - where do I begin?

You need to get maven and try it out - see this page to get started with DirectMemory

Clone this wiki locally