arrow
Return

HeapBuffers: Why Not Just Using a Binary Serialization Format for Your Managed Memory?

delete2025-10-01
delete0
PRE
AI
D
Daniele Bonetta *
L
Loff, Junior
M
Matteo Basso
W
Walter Binder
DOI:10.1145/3763175delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
In modern cloud applications, data serialization and deserialization (DSD) are common yet expensive operations. Languages such as Java incur significant overhead from DSD operations because of their managed memory, which uses an IO-incompatible, sparse, platform-dependent data layout for storing objects. Can language VMs bypass costly DSD operations by directly operating on an IO-ready binary format? In this paper, we address this question by presenting a new DSD library for Java called HeapBuffers. HeapBuffers maintains a Java-friendly programming model through managed memory, yet it operates on data stored using a dense, platform-independent, memory format. In this way, HeapBuffers data can be used to perform IO operations without the need to convert objects from/to a VM-internal memory representation, thus eliminating the need for expensive DSD operations. Compiler optimizations combined with specialized garbage collection ensure that accessing HeapBuffers data is nearly as efficient as handling regular Java objects. The answer to our question is largely positive: our experiments show that HeapBuffers data can be accessed at high performance and can be used as is to perform IO, making the cost of DSD effectively negligible. IO performance of applications using HeapBuffers is often orders of magnitude faster than that obtained using the prevailing DSD libraries.
Keywords:
Data serialization and deserialization
Managed language runtimes
Garbage collection
FlatBuffers

Journal

P
Proceedings of the ACM on Programming Languages-PACMPL
IF:
2.8
Papers:
308
Citations:
4.7K

Organization

U
Universita della Svizzera Italiana
Scholars:
3.3K
Papers: 2.8K
Citations: 3
V
vrije universiteit amsterdam
Scholars:
3.0K
Papers: 1.4K
Citations: 0