Java Serialization Options
Just a quick list for now - i need to come back and do a proper
comparison at some point.
- Java serialization
- With serialVersionUID (makes no difference to performance, mention
only to dismiss)
- With serialPersistentFields
- With fields marked unshared where appropriate
- With readObject/writeObject
- With Externalizable
- http://www.jboss.org/serialization/
- http://jserial.sourceforge.net/
- XStream (various options)
- Some kind of ASN.1?
- JAXB
- Is there any way to get CORBA / IIOP to serialize structs?
- Purely hand-hacked
- JSON toolkits?
- Javolution
XML marshalling - claims "performance on a par or better than
default JavaTM Serialization/Deserialization", as well as various
realtimey and exciting properties
- Action
Message Format, version 3, aka AMF3; actually a format for Flash,
but looks flexible enough to handle java objects. What look like
implementations in Granite
Data Services and Cinnamon.
- Stefan Ram's serializer (class de.dclj.ram.notation.junobjects.Junobjects).
- Avro, part of Hadoop
- Hessian (an RPC protocol, but must contain a serialisation format somewhere)
Random notes:
- A Standard
Compression Scheme for Unicode - a good basis for string encoding if
you don't know what script your text is likely to be in. It's roughly as
efficient as any script-specific encoding, but can cover all unicode
(although it chokes a bit on anything from the private use area, and
handles characters off the BMP as surrogate pairs). It actually handles
european text better than UTF-8 - it can fit almost all of 8859-1 in one
byte per character.
- BOCU-1, like SCSU but different