1 of 1 people found this helpful
JBoss Marshalling is very fast, lean and efficient; also it works correctly in environments with multiple/modular classloaders.
JBMAR is aiming Java only, while Protocol Buffers aims at language-neutrality; that's pretty cool but we don't need it and that feature definitely impacts performance, so actually comparing them would be unfair for ProtoBuf
In fact JBMar are more of a stremlined set of helpers to correctly manage the streams; personally I love it because for each type it's easy for me to define how I want it wire-encoded: do you define your custom Externalizers?
Custom Externalizers are the way to go for top performance ..
We are only looking for Java. So if i understand right JBMAR performance would be better than protobuff.
Basically our entities have datatypes like Dates , BigDecimals. Strings, Longs and Enums.
Currently we do use the default java serialization. As part of out optimization phase we were looking at other custom serialzation options like custom eternalizers, jboss marshelling and protobuff.
You were very right in your prediction .
I tried for one of our entities and i see the follwing results
Java serialization - 1127 bytes
JBoss Serialization - 1125 byts
Extrenalizable - 999 bytes - (Close to 10% less payload)
Just publishing if any1 woudl benefit.
The more your object get complex, the bigger the difference you would see. Also I think it's very welcome to separate the Externalizer definition from the class, as it make it easier to update the class without breaking the compatibility with the binary stream.
Did you try converting the same using protobuff?
Yes we are planning to seperate it out from the class definition as explained in the documentation.
I have not tried protobuff, with teh assumption that externalization woudl be the best option :-)