Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: Low-latency alternative to Java Object Serialization Date: Sat, 01 Oct 2011 09:48:50 -0700 Organization: A noiseless patient Spider Lines: 29 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 1 Oct 2011 16:48:54 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="XjIWM99mD7Ijfdu600oVPA"; logging-data="21615"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19pZg2flYimc2jEY0EAUyJusbVc232p4o4=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0) Gecko/20110922 Thunderbird/7.0 In-Reply-To: Cancel-Lock: sha1:FHj3EnZc5BOZfnCR9OJjM/Eu6X8= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8448 On 10/1/2011 5:46 AM, Giovanni Azua wrote: > Three years ago I worked for a "high frequency trading" company and they > avoided default Java Serialization like "the devil to the cross" Just because "avoid serialization" was a requirement for your previous work, doesn't mean that it should be a requirement for every project after that. Frequently, the low-developer cost of Java serialization overrides all other concerns. The increase in CPU costs and network bandwidth it requires is very cheap. DO NOT work around Java serialization unless you are sure you need to. I.e., after careful analysis (and profiling) of a working app or prototype. If you do need to work around Java serialization, look at Externalizable interface. http://java.sun.com/developer/technicalArticles/Programming/serialization/ Note the sections on "gotchas" in that article. Esp. both the caching and the performance considerations. Totally rolling your own protocol is possible too if you need the utmost performance. 'Tain't hard. 'Tain't easy either. Data IO Streams are a good compromise between higher level serialization and raw sockets.