[concurrency-interest] subList, subMap and navigable
stanimir at riflexo.com
Mon Jul 23 11:01:52 EDT 2012
Well, for custom objects and interfaces you can't get much better than
serialization [w/o adding boiler plate code at least]. If the performance
of serialization is still the bootleneck, one can opt for Externalizeable.
Again, I am not concerned with performance in that aspect at all.
On Mon, Jul 23, 2012 at 5:48 PM, √iktor Ҡlang <viktor.klang at gmail.com>wrote:
> On Mon, Jul 23, 2012 at 4:27 PM, Stanimir Simeonoff <stanimir at riflexo.com>wrote:
>> It looks subMaps returned by the implementers of SortedMap are
>> serializable as rule of the thumb. All subLists returned by COWArrayList,
>> ArrayList, LinkedList, etc are not. The latter is a major issue with RPC
>> since if methods accept just java.util.List it'd be excepted to work
>> remotely just as they work in the same JVM. In our case it was rarely a
>> subList to be serialized, so it was not caught early on.
>> The behavior clearly favors SortedMap for unknown reason, Maps can be
>> just as big or even bigger than Lists (List can have more than 2^31
>> elementes or all get/set, ListIterator fail)
>> While I realize it's an official bug:
>> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4782922 I do not
>> quite understand the closing reason - writeReplace is always an option to
>> minimize serialization footprint. Also SortedMaps (like TreeMap) do not
>> even try to optimize that.
>> Is there any objective reason the bug/RFE to still be considered "closed,
>> will not implemented" [as COW follows the same path]?
>> Another question, based mostly on curiosity. Was NavigableSet/Map
>> introduced in JDK1.6 to mostly accommodate the CSLM or if was fixing
>> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4155650 ?
> Using Java Serialization is definitely not something you want to use for
> RPC for performance reasons.
>> Concurrency-interest mailing list
>> Concurrency-interest at cs.oswego.edu
> Viktor Klang
> Akka Tech Lead
> Typesafe <http://www.typesafe.com/> - The software stack for applications
> that scale
> Twitter: @viktorklang
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest