[concurrency-interest] subList, subMap and navigable

√iktor Ҡlang viktor.klang at gmail.com
Mon Jul 23 10:48:38 EDT 2012


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.

Cheers,
√


>
> Thanks
> Stanimir
>
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
>
>


-- 
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...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20120723/c567372b/attachment.html>


More information about the Concurrency-interest mailing list