I understand off-heap storage helps in avoiding long GC pauses, but I want to know how java serializes objects while storing on heap and how ignite serializes while storing off-heap?, like GC is run to free up space, what happens when off-heap is used to free up space and how that compares with GC? How does off-heap fares against heap storage?
We are trying a POC to evaluate ignite and hazelcast, ignite offers off-heap storage, so want to understand the details of it to come to a conclusion..
Java doesn't serialize data which is stored on-heap. The whole idea of serialization is about taking away objects from heap to other medium, such as off-heap. So it's just stored.
Ignite implements fast serialization using Binary Objects, Externalizable and Binarylizable interfaces.
Ignite does not need to GC its off-heap since it explicitly keeps tracks of all key-value pairs. When something is deleted the memory is available for use immediately (GC is only really needed for graph systems, not key-value and neither SQL).
However, things might be somewhat different for recently introduced transactional SQL with its vacuum procedure.