CoDeSe is a new approach for serialization/deserialization. Traditionally, the format for stored states is based on data: serialization generates the data that encodes the state, and deserialization interprets this data to restore the state. We propose a new approach, called CoDeSe, where the format for stored states is based on code: serialization generates code whose execution restores the state, and deserialization simply executes the code. We have developed CoDeSe for Java.
PublicationMilos Gligoric, Darko Marinov, and Sam Kamin
CoDeSe: Fast Deserialization via Code Generation
International Symposium on Software Testing and Analysis
(ISSTA 2011), pages 298-308, Toronto, Canada, July 2011
Currently, the source code CoDeSe is not available. However, CoDeSe-Dataset, which is available for download includes:
- Serialized form of some subjects that we used in our study. Subjects are serialized using Standard Java Library (SJL) and CoDeSe.
- Simple InputStream that can be used to deserialize subjects that are serialized using CoDeSe.
- Script for building code and running deserialization for the provided subjects.
You should download the source/binaries that are appropriate for the version of Java that you use (32bit vs 64bit).
- Binaries (28 MB)
- Source (26 MB)
If you have downloaded the source, to build the code, execute:
$> antImportant: you may have to increase memory used by ant/javac
The CoDeSe-Dataset bundle includes a script for running the code.
- To run/deserialize all the subjects, execute:
- For available options and more examples check:
$> ./exe.sh --all 1
$> ./exe.sh --help
As expected, CoDeSe gives different results on different machines. We would like to analyze the impact that machine specification (number of cores, memory, java version, ...) has on CoDeSe and deserialization in general. We would appreciate it if you email to Milos Gligoric the file (codese-study.txt) generated by executing the following:
$> ./exe.sh --sendAn example of a generated file is available here.
We thank Hojun Jaygarl, Sunghun Kim, Tao Xie, and Carl K. Chang for providing the data from their OCAT study, Matt Kirn for sharing his code that automatically adds the Serializable interface to classes (necessary for serialization in SJL), and Dmytro Suvorov and Vilas Jagannath for initial discussions about this work.