Hello all,

I was playing with the Kryo (https://code.google.com/p/kryo/) serialization
library, comparing it to Java default serialization and
Marshalling/Unmarshalling with JaxB.

Taking aside Java Serialization, which would require me to implement
Serializable and I can't,
I like the fact that Kryo:
- has serialized my JaxB Annotated classes 5 time faster than JaxB
Marshalling
- it has proved to be compatible using only the default "FieldSerializer",
which don't require to implement Serializable on the classes.


I wonder if anyone has experience with Camel and Kryo and if anyone has
ever thought of a camel-kryo dataformat.
I now use JaxB to put classes in ActiveMQ, I'm worried with performances, I
think such data format would be able to provide a faster alternative non
intrusive alternative.



Here the result of my comparison of Kryo vs JaxB (only
marshalling/serialization, dataset of 1000 random generated classes which
in XML are each one 480 nodes in average, with about 1,2 attributes per
node).

Testing JaxB Marshalling
Total Time: 1.186 seconds
Total Size: 37689851 (string length)

Testing Serialization with Kryo
Total Time: 0.216 seconds
Total Size: 3674796 (bytes)

Checking Serialization with Kryo
Checked 1000 classes, 1000 instances, 1000 marshalled strings

(in this last test I've verified the classes serialized/deserialized with
Kryo comparing them as marshalled XML string with .equals() )

Reply via email to