[concurrency-interest] subList, subMap and navigable

√iktor Ҡlang viktor.klang at gmail.com
Mon Jul 23 12:13:23 EDT 2012


On Mon, Jul 23, 2012 at 6:11 PM, Gregg Wonderly <gregg at cytetech.com> wrote:

> Serializable can be fragile and slow, when you just blindly use it.  But
> if you manage object version etc., you can make Serialization be quite
> performant for RPC stuff.  I use it over a TCP Stream (in a Jini
> application) which blows through 1000's of events per second, no problem.


That's a quite modest load though. And Single-threaded I presume?


>  It really depends on what you are wrapping in the serialization.
>

Well of course.

Cheers,
√


>
> Gregg Wonderly
>
>
> On 7/23/2012 10:01 AM, Stanimir Simeonoff wrote:
>
>> 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.
>>
>> Stanimir
>>
>> On Mon, Jul 23, 2012 at 5:48 PM, √iktor Ҡlang <viktor.klang at gmail.com
>> <mailto:viktor.klang at gmail.com**>> wrote:
>>
>>
>>
>>     On Mon, Jul 23, 2012 at 4:27 PM, Stanimir Simeonoff <
>> stanimir at riflexo.com
>>     <mailto: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<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<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<Concurrency-interest at cs.oswego.edu>
>>         <mailto:Concurrency-interest@**cs.oswego.edu<Concurrency-interest at cs.oswego.edu>
>> >
>>
>>         http://cs.oswego.edu/mailman/**listinfo/concurrency-interest<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
>>
>>
>>
>>
>> ______________________________**_________________
>> Concurrency-interest mailing list
>> Concurrency-interest at cs.**oswego.edu <Concurrency-interest at cs.oswego.edu>
>> http://cs.oswego.edu/mailman/**listinfo/concurrency-interest<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/6bace3b1/attachment.html>


More information about the Concurrency-interest mailing list