Special Issue Paper
Fuel: a fast general purpose object graph serializer
Version of Record online: 19 JUN 2012
Copyright © 2012 John Wiley & Sons, Ltd.
Software: Practice and Experience
Special Issue: Special issue on International Workshop on Smalltalk Technologies 2011.
Volume 44, Issue 4, pages 433–453, April 2014
How to Cite
Dias, M., Peck, M. M., Ducasse, S. and Arévalo, G. (2014), Fuel: a fast general purpose object graph serializer. Softw: Pract. Exper., 44: 433–453. doi: 10.1002/spe.2136
- Issue online: 4 MAR 2014
- Version of Record online: 19 JUN 2012
- Manuscript Accepted: 1 JUN 2012
- Manuscript Revised: 5 MAR 2012
- Manuscript Received: 26 OCT 2011
- Ministry of Higher Education and Research, Nord-Pas de Calais Regional Council and FEDER. Grant Number: CPER 2007-2013
- object-oriented programming;
- object graphs;
- pickle format;
Because objects need to be stored and reloaded on different environments, serializing object graphs is a very important activity. There is a plethora of serialization frameworks with different requirements and design trade-offs. Most of them are based on recursive parsing of the object graphs, an approach which often is too slow. In addition, most of them prioritize a language-agnostic format instead of speed and language-specific object serialization. For the same reason, such serializers usually do not support features such as class-shape changes, global references or executing pre and post load actions. Looking for speed, some frameworks are partially implemented at Virtual Machine (VM) level, hampering code portability and making them difficult to understand, maintain and extend.
In this paper, we present Fuel, a general-purpose object serializer based on these principles: (1) speed, through a compact binary format and a pickling algorithm which invests time in serialization for obtaining the best performance on materialization; (2) good object-oriented design, without special help at VM; and (3) serialize any object, thus have a full-featured language-specific format.
We implement and validate this approach in Pharo, where we demonstrate that Fuel is faster than other serializers, even those with special VM support. The extensibility of Fuel made possible to successfully serialize various objects: classes in Newspeak, debugger stacks, and full content management system object graphs. Copyright © 2012 John Wiley & Sons, Ltd.