Question

We are planning to port our C++ in-memory DB app into Java. We are looking to using Hazelcast as a in-memory DB solution in Java parlance.

The required throughput from a system having 40TB of data is 30k reads and writes per sec. Since the amount of data in memory is large we cannot compromise on throughput once the system goes down.

An in house implementation using C++ provides us a flexibility of storing this data in shared memory along with the disk storage. Once the application restarts we can recover it by attaching the process back to shared memory file.

Can we have a similar functionality available in Hazelcast as well? Or is there some similar in-memory data grid solution where we can have this functionality?

Was it helpful?

Solution

Currently Hazelcast doesn't have a disk overflow feature; but our guys are working on it and hopefully it will be available in Hazelcast 3.3.

So you need to make use of a custom MapLoader/MapStore interface you can connect to a Map instance and add the persistence yourself.

OTHER TIPS

From Overflow in Hazelcast Queue Store

by Enes Akar December 26, 2013 Comments Off on Overflow in Hazelcast Queue Store One of the new features of Hazelcast 3 is the queue store.

Differently from map store; overflow is possible. If you set a memory Iimit; it starts persisting to disk and skipping the memory when queue reaches this limit.

Here the configuration:

<queue-store>
            <class-name>com.hazelcast.QueueStoreImpl</class-name>
            <properties>
                <property name="binary">false</property>
                <property name="memory-limit">1000</property>
                <property name="bulk-load">500</property>
            </properties>
</queue-store>

For above configuration:

Items will be persisted in their Object form (deserialized one).

If the size of the queue has reached 1000 (memory-limit), next element will be just persisted to disk it will not be stored in memory.

Items will be loaded from store in bulks with size 500.

Some more notes:

Use memory-limit when you avoid over-usage of RAM in case of high load.

If you want all items in memory (and store) use Integer.MAX_VALUE, if you want all items just in store then use 0 as memory-limit.

If you do not reach the store externally (just hazelcast uses the store) then make the binary configuration to true. That will increase the performance as a step for deserialization will be skipped.

Here you can see some examples of QueueStore implementation:

https://github.com/hazelcast/hazelcast/blob/master/hazelcast/src/test/java/com/hazelcast/queue/QueueStoreTest.java

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top