-
Comparing the Java Serialization Options (18 messages)
- Posted by: Boni Gopalan
- Posted on: September 15 2009 07:16 EDT
The results of Serialization comparison is interesting. For complex Pojos the Protocol Buffers performs almost double as fast as Java Serialization. JSON seems to be very slow (I used Json-Lib). A good by product of the comparison was that a test harness emerged. This test harness can be easily extended to compare a new Serialization technology or different way to implement serialization of a previously compared technology. The results @ a glance: // =========[smaller the number the better] // Java Serialization...............:2135 // JSON Serialization...............:20523 // Google ProtoBuf Serialization....:1472 // =======================================Threaded Messages (18)
- Re: Comparing the Java Serialization Options by Denis Mukhin on September 15 2009 08:14 EDT
- Re: Comparing the Java Serialization Options by Denis Mukhin on September 15 2009 08:17 EDT
- Re: Comparing the Java Serialization Options by Andy Yates on September 15 2009 10:08 EDT
- Re: Comparing the Java Serialization Options by Denis Mukhin on September 15 2009 08:17 EDT
- Re: Comparing the Java Serialization Options by Istvan Soos on September 15 2009 10:58 EDT
- Unfair by Nikita Ivanov on September 15 2009 12:23 EDT
- Re: Unfair by William Louth on September 15 2009 13:37 EDT
- Re: Unfair by Amin Abbaspour on September 16 2009 03:22 EDT
- Re: Unfair by William Louth on September 16 2009 10:16 EDT
- Missing link to blog post by Staffan Larsen on September 15 2009 14:14 EDT
- Re: Missing link to blog post by Ashwin Jayaprakash on September 15 2009 16:15 EDT
-
The Serialization Options by Boni Gopalan on September 15 2009 11:07 EDT
- Correction to previous post by Boni Gopalan on September 15 2009 11:10 EDT
-
Re: The Serialization Options by Scott Ferguson on September 16 2009 05:03 EDT
- Re: The Serialization Options by Scott Ferguson on September 16 2009 05:24 EDT
- Fun games by 2134234 234234 on June 10 2010 02:35 EDT
-
The Serialization Options by Boni Gopalan on September 15 2009 11:07 EDT
- Re: Missing link to blog post by Ashwin Jayaprakash on September 15 2009 16:15 EDT
- Everyone reading this should probably look at this... by Fox Touche on September 16 2009 20:19 EDT
- Re: Everyone reading this should probably look at this... by Fox Touche on September 16 2009 20:22 EDT
- A faster protobuf implemenation. by Hiram Chirino on September 18 2009 09:49 EDT
- Re: Everyone reading this should probably look at this... by Fox Touche on September 16 2009 20:22 EDT
-
Re: Comparing the Java Serialization Options[ Go to top ]
- Posted by: Denis Mukhin
- Posted on: September 15 2009 08:14 EDT
- in response to Boni Gopalan
Missing details. Really :) -
Re: Comparing the Java Serialization Options[ Go to top ]
- Posted by: Denis Mukhin
- Posted on: September 15 2009 08:17 EDT
- in response to Denis Mukhin
Oops. I think blog entry link should also appear here... -
Re: Comparing the Java Serialization Options[ Go to top ]
- Posted by: Andy Yates
- Posted on: September 15 2009 10:08 EDT
- in response to Denis Mukhin
Aye a blog post/more information would be very useful even though the results are unsurprising. I'm quite surprised thought that only 3 methods of serialization are mentioned as well considering I can think of ones like * Hessian * Burlap * XML * Thrift Just off the top of my head. -
Re: Comparing the Java Serialization Options[ Go to top ]
- Posted by: Istvan Soos
- Posted on: September 15 2009 10:58 EDT
- in response to Boni Gopalan
XStream? -
Unfair[ Go to top ]
- Posted by: Nikita Ivanov
- Posted on: September 15 2009 12:23 EDT
- in response to Boni Gopalan
This is just unfair. Google' lib requires you to define the type structure manually upfront... With that "convenience" I'm really surprised how actually slow Google's implementation is. Apples to apples, please. Nikita Ivanov -- GridGain - Cloud Development Platform -
Re: Unfair[ Go to top ]
- Posted by: William Louth
- Posted on: September 15 2009 13:37 EDT
- in response to Nikita Ivanov
Maybe because it is not measuring what it should really be measuring. William -
Re: Unfair[ Go to top ]
- Posted by: Amin Abbaspour
- Posted on: September 16 2009 03:22 EDT
- in response to Nikita Ivanov
This is just unfair. Google' lib requires you to define the type structure manually upfront... With that "convenience" I'm really surprised how actually slow Google's implementation is.
This was an informative post for me. Comparisons made by vendors are always labeled as being biased, hence we need those performed by community. BTW in most critical applications, the inconvenience of steps is neglectable in favor of speed and optimal behavior achieved. Google Protocol Buffer is a great model, esp. with its emphasis in immutability. Hopefully tools will emerge to ease the usage even more. -
Re: Unfair[ Go to top ]
- Posted by: William Louth
- Posted on: September 16 2009 10:16 EDT
- in response to Nikita Ivanov
Would you still say it was relatively (comparatively) slow if the numbers excluded a number of factors including most importantly a baseline. Should you b compared X with Y or X - Z with Y - Z. What is Z? ..... -
Missing link to blog post[ Go to top ]
- Posted by: Staffan Larsen
- Posted on: September 15 2009 14:14 EDT
- in response to Boni Gopalan
Here is the missing link: http://whiteboardjunkie.wordpress.com/2009/09/14/serialization-options-compared/ -
Re: Missing link to blog post[ Go to top ]
- Posted by: Ashwin Jayaprakash
- Posted on: September 15 2009 16:15 EDT
- in response to Staffan Larsen
This one seems more complete - http://code.google.com/p/thrift-protobuf-compare/wiki/Benchmarking Ashwin. -
The Serialization Options[ Go to top ]
- Posted by: Boni Gopalan
- Posted on: September 15 2009 23:07 EDT
- in response to Ashwin Jayaprakash
Ashwin : There are some subtle differences between the two. The test is the results of an echo server implementation using Jboss Remoting. This is more realife comparison than what thrift-protobuf-compare is doing. Furthermore the domain object being serialized and deserialized is much more complex and complete that the specimen used in the other project. The object I am using for comparison has two types of collections, One Enum and a Java Bean instance as member variables. Another difference is that the comparison is also addressing the effect of transport on speed. thrift-protobuf-compare is a lot more complete in its shape and size than the artifact I had at the end of 2hrs of coding :-), No surprise there. However: Had there been only one way of doing anything thrift-protobuf-compare would not have existed anyways! What I have now is a pretty good framework for easily addiing and comparing other serialization options. I'd request participation from interested people, the code is open anyways. Nikita: Yes, the process complexity is there with Protocol Bufferes. I do not think it can be circumvented with some tooling. What I am thinking is Annotated Pojos that gives hints to a code generator ro create and compile .proto files. -
Correction to previous post[ Go to top ]
- Posted by: Boni Gopalan
- Posted on: September 15 2009 23:10 EDT
- in response to Boni Gopalan
Nikita: Yes, the process complexity is there with Protocol Bufferes. I think it can be circumvented with some tooling. What I am thinking is Annotated Pojos that gives hints to a code generator ro create and compile .proto files. -
Re: The Serialization Options[ Go to top ]
- Posted by: Scott Ferguson
- Posted on: September 16 2009 05:03 EDT
- in response to Boni Gopalan
Those hessian numbers don't look right. Is that using Hessian 1 or Hessian 2? There's a big improvement for Hessian 2 both in performance and in serialization size. -
Re: The Serialization Options[ Go to top ]
- Posted by: Scott Ferguson
- Posted on: September 16 2009 05:24 EDT
- in response to Scott Ferguson
Hmm. It's Hessian 2, but there's a good deal of extra overhead using it that way. Interesting. I should be able to improve that performance. -
Fun games[ Go to top ]
- Posted by: 2134234 234234
- Posted on: June 10 2010 02:35 EDT
- in response to Scott Ferguson
I should mention that is compares "benchmarks for protobuf, thrift, java, scala, few implementations of stax, binaryxml, json, xstream, javolution, hessian, air jordan avro, sbinary and JSON Marshaller."
-
Everyone reading this should probably look at this...[ Go to top ]
- Posted by: Fox Touche
- Posted on: September 16 2009 20:19 EDT
- in response to Boni Gopalan
-
Re: Everyone reading this should probably look at this...[ Go to top ]
- Posted by: Fox Touche
- Posted on: September 16 2009 20:22 EDT
- in response to Fox Touche
http://code.google.com/p/thrift-protobuf-compare/wiki/Benchmarking
I should mention that is compares "benchmarks for protobuf, thrift, java, scala, few implementations of stax, binaryxml, json, xstream, javolution, hessian, avro, sbinary and JSON Marshaller." -
A faster protobuf implemenation.[ Go to top ]
- Posted by: Hiram Chirino
- Posted on: September 18 2009 21:49 EDT
- in response to Fox Touche
For those of you looking for a faster and easier to use protobuf implementation, you might want to check out this blog post. -- Regards, Hiram Blog: http://hiramchirino.com Open Source SOA http://fusesource.com/