tag:blogger.com,1999:blog-6877629428951398731.post6002275253224748990..comments2024-01-09T09:02:40.935-08:00Comments on Java Persistence Performance: Optimizing Java Serialization - Java vs XML vs JSON vs Kryo vs POFJameshttp://www.blogger.com/profile/07275512393744882781noreply@blogger.comBlogger16125tag:blogger.com,1999:blog-6877629428951398731.post-89353204368521623912016-10-17T14:27:02.807-07:002016-10-17T14:27:02.807-07:00Externalizor is a new open source library which au...<a href="https://github.com/qwazr/externalizor" rel="nofollow">Externalizor</a> is a new open source library which automatically handles JAVA serialization thru the Externalizable interface. It also includes compression mechanisms for primitive array (based on snappy).<br />Anonymoushttps://www.blogger.com/profile/09091862543879791277noreply@blogger.comtag:blogger.com,1999:blog-6877629428951398731.post-29351364933173424252016-10-17T14:25:24.875-07:002016-10-17T14:25:24.875-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/09091862543879791277noreply@blogger.comtag:blogger.com,1999:blog-6877629428951398731.post-78529453087511305232016-07-21T00:17:12.413-07:002016-07-21T00:17:12.413-07:00Serialization is the process of writing complete s...Serialization is the process of writing complete state of java object into output stream, that stream can be file or byte array or stream associated with TCP/IP socket. Thanks for sharing this post on optimizing java serialization. <br /><br /><a href="http://www.jaintechnosoft.com/services/seo-internet-marketing" rel="nofollow">SEO Company in Bangalore</a> | <a href="http://www.jaintechnosoft.com/services/website-design-development" rel="nofollow">Web Developers in Bangalore</a>Karen Jainhttps://www.blogger.com/profile/13475330047520112724noreply@blogger.comtag:blogger.com,1999:blog-6877629428951398731.post-26576668512507151122015-12-14T15:58:39.869-08:002015-12-14T15:58:39.869-08:00XStream is another possibility. Whether JSON, XML ...XStream is another possibility. Whether JSON, XML or what have you it is fast and malleable. Normally it will spell out the full class name as part of the String it produces but you can use aliases to make it more like a language neutral marshaling and make the objects smaller.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6877629428951398731.post-77926968209501593492015-02-24T20:45:23.504-08:002015-02-24T20:45:23.504-08:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/05777154553719041282noreply@blogger.comtag:blogger.com,1999:blog-6877629428951398731.post-50570718409341991232015-02-24T20:43:56.047-08:002015-02-24T20:43:56.047-08:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/05777154553719041282noreply@blogger.comtag:blogger.com,1999:blog-6877629428951398731.post-21097535844560517392015-02-24T20:43:41.046-08:002015-02-24T20:43:41.046-08:00great article! helped me a lot! thank u sooooooooo...great article! helped me a lot! thank u sooooooooooo much....Anonymoushttps://www.blogger.com/profile/05777154553719041282noreply@blogger.comtag:blogger.com,1999:blog-6877629428951398731.post-70336292543555353142013-09-11T04:43:43.719-07:002013-09-11T04:43:43.719-07:00Cool! Could you provide the source code for your e...Cool! Could you provide the source code for your experiment so that others can test it as well? Thanks!Unknownhttps://www.blogger.com/profile/15309433871026394214noreply@blogger.comtag:blogger.com,1999:blog-6877629428951398731.post-50346174565969165422013-09-08T11:53:41.400-07:002013-09-08T11:53:41.400-07:00For my own interest, I did the same with Java Chro...For my own interest, I did the same with Java Chronicle 2.0. Java Chronicle includes writing and reading from a file which makes it more interesting for me.<br /><br />order lines: 1<br />orderCache-Kryo-serialize : 743181<br />orderCache-Kryo-deserialize : 707776<br />Size: 90<br /><br />orderCache-Java-serialize : 217936<br />orderCache-Java-deserialize : 31579<br />Size: 636<br /><br />order-Chronicle-serialize : 6892399<br />order-Chronicle-deserialize : 5943322<br />Size: 12<br /><br />---<br /><br />order lines: 100<br />order-Chronicle-serialize : 201030<br />order-Chronicle-deserialize : 146758<br />Size: 507Peter Lawreyhttps://www.blogger.com/profile/17982030676088168612noreply@blogger.comtag:blogger.com,1999:blog-6877629428951398731.post-19800629744964985062013-08-26T23:43:41.104-07:002013-08-26T23:43:41.104-07:00
Hello Mr Sutherland,
Nice blog! I would like to ...<br />Hello Mr Sutherland,<br /><br />Nice blog! I would like to discuss a partnership opportunity between<br />our sites. Is there an email address I can contact you in private?<br /><br />Thanks,<br /><br />Eleftheria Kiourtzoglou<br /><br />Head of Editorial Team<br /><br />Java Code Geeks<br /><br />email: [dot][at]javacodegeeks[dot]com<br />Eleftheria K.https://www.blogger.com/profile/01422775348267693966noreply@blogger.comtag:blogger.com,1999:blog-6877629428951398731.post-55913940998410528362013-08-15T12:23:13.012-07:002013-08-15T12:23:13.012-07:00If you are interested in serialization performance...If you are interested in serialization performance, you should first check out JVM-serializers project (https://github.com/eishay/jvm-serializers). It has already tested most of things you did.<br /><br />One very fast choice you did not include is Jackson (https://github.com/FasterXML/jackson).<br />Jackson is the fastest way to serialize POJOs as JSON (and possibly fastest for XML as well). It also supports binary JSON representation called Smile.<br />The main reason for Jackson inclusion is actually the fact that most Java service frameworks nowadays include it in one way or another; I was actually surprised to see that it was not included here.<br />Unknownhttps://www.blogger.com/profile/02343617472112278520noreply@blogger.comtag:blogger.com,1999:blog-6877629428951398731.post-91499420341851016372013-08-14T08:34:35.158-07:002013-08-14T08:34:35.158-07:00@Remko, @James:
FYI, the trunk version of Kryo (2...@Remko, @James: <br />FYI, the trunk version of Kryo (2.22-SNAPSHOT) provides support for serialization using ByteBuffers and sun.misc.Unsafe. Just use UnsafeInput/UnsafeOutput or UnsafeMemoryInput/UnsafeMemoryOutput instead of the usual Input/Output classes provided by Kryo. These specialized classes provide a significant performance boost in many situations.<br /><br />BTW, similar approach was recently borrowed from Kryo by Hazelcast 3.0 and Avro. So, expect good results from them as well.Unknownhttps://www.blogger.com/profile/15309433871026394214noreply@blogger.comtag:blogger.com,1999:blog-6877629428951398731.post-23752168734845701162013-08-14T06:55:30.437-07:002013-08-14T06:55:30.437-07:00Wonder whether you can include GSON and protobuf i...Wonder whether you can include GSON and protobuf in the benchmark.Ramhttps://www.blogger.com/profile/17267982040360350563noreply@blogger.comtag:blogger.com,1999:blog-6877629428951398731.post-17063667972519316702013-08-14T06:18:43.545-07:002013-08-14T06:18:43.545-07:00@remko Thanks for the comment, interesting blog po...@remko Thanks for the comment, interesting blog post, in terms of rolling your own serialization, and managing your own memory. The object being tested is quite simplistic, rolling your own becomes more complex as your object model's complexity increases. Also the test was only writing a single object, where Java serialization is going to have a big overhead, Java serialization would do much better for a larger set of the objects.Jameshttps://www.blogger.com/profile/07275512393744882781noreply@blogger.comtag:blogger.com,1999:blog-6877629428951398731.post-20399987331747054532013-08-13T17:05:23.745-07:002013-08-13T17:05:23.745-07:00I can't resist... Here are some numbers from t...I can't resist... Here are some numbers from the <a href="http://mechanical-sympathy.blogspot.jp/2012/07/native-cc-like-performance-for-java.html" rel="nofollow">article</a> above:<br /><br />2.4GHz Sandy Bridge - Java 1.7.0_04<br />===================================<br />0 Serialisation write=1,940ns read=9,006ns total=10,946ns<br />1 Serialisation write=1,674ns read=8,567ns total=10,241ns<br />2 Serialisation write=1,666ns read=8,680ns total=10,346ns<br />3 Serialisation write=1,666ns read=8,623ns total=10,289ns<br />4 Serialisation write=1,715ns read=8,586ns total=10,301ns<br />0 ByteBuffer write=199ns read=198ns total=397ns<br />1 ByteBuffer write=176ns read=178ns total=354ns<br />2 ByteBuffer write=174ns read=174ns total=348ns<br />3 ByteBuffer write=172ns read=183ns total=355ns<br />4 ByteBuffer write=174ns read=180ns total=354ns<br />0 UnsafeMemory write=38ns read=75ns total=113ns<br />1 UnsafeMemory write=26ns read=52ns total=78ns<br />2 UnsafeMemory write=26ns read=51ns total=77ns<br />3 UnsafeMemory write=25ns read=51ns total=76ns<br />4 UnsafeMemory write=27ns read=50ns total=77nsAnonymoushttps://www.blogger.com/profile/07784933209710841050noreply@blogger.comtag:blogger.com,1999:blog-6877629428951398731.post-33204161955205697392013-08-13T16:54:56.221-07:002013-08-13T16:54:56.221-07:00Serializing objects directly using ByteBuffers or ...Serializing objects directly using ByteBuffers or sun.misc.Unsafe can be orders of magnitude faster than Java serialization: <a href="http://mechanical-sympathy.blogspot.jp/2012/07/native-cc-like-performance-for-java.html" rel="nofollow">http://mechanical-sympathy.blogspot.jp/2012/07/native-cc-like-performance-for-java.html</a>Anonymoushttps://www.blogger.com/profile/07784933209710841050noreply@blogger.com