[concurrency-interest] java.util.collections

Dmitry Kiriy dmitry.kiriy@db.com
Wed, 11 Feb 2004 16:08:18 +0300


(Doug, I'am sorry, my email client reply you directly)

Doug,

>>>>> But this technique works only if the underlying Map class conforms 
to
>>>>> assumptions that pure read/retrieval methods have no
>>>>> writes/side-effects. There's no way that a wrapper class can check
>>>>> such assumptions, and we can't expect users of this class to always
>>>>> know if the assumptions hold. And when they do not hold, you can get
>>>>> serious corruption of underlying data structures.  So the only
>>>>> conclusion we could reach is that we should not supply it, but
>>>>> tell/show people how to do it themselves when they are sure it
>>>>> applies.

I think, here we miss something really important.

There at least 2 types of Java developers:

1. Application developers (Business software)
2. System developers (App servers, Concurrent utils :), Special types of 
Maps (Apache))

Bring Concurrent in SDK is moving quality, relible, rubust bla-bla 
Concurrent programming from
system developers level (you) to widest range of development.

Application developers not ever create implementations of Map or Queue.
So, possible side-effect IS NOT an issue, case just probably really 3-5 of 
Map implementations used worldwide (compare to million java developers).

So, I try comment your words keep im mind above:

>>>>>But this technique works only if the underlying Map class conforms to
>>>>> assumptions that pure read/retrieval methods have no
>>>>> writes/side-effects. 
        Apache should care about.

>>>>> There's no way that a wrapper class can check
>>>>> such assumptions, and we can't expect users of this class to always
>>>>> know if the assumptions hold. 
        Still Apache troubles here

>>>>> So the only
>>>>> conclusion we could reach is that we should not supply it, but
>>>>> tell/show people how to do it themselves when they are sure it
>>>>> applies.

        We can explain that Apache commons project directly.

        regs,

                Dmitriy

__________________________
Dmitriy Kiriy

Derivatives IT Dept.
Global Markets,
Deutsche Bank Moscow

Ph.: +7 095 7830367
Ph. local: 1367