I think that a generic interface should be used (As previously stated
Map for example).
>From one side you have a default with each version.
On the other side , if during some time we'll find out that the choice
is not optimal it's an easy switch.
Adding a factory/configuration adds an unneeded complications to a frame
work that should run out of the box.



On Thu, 2007-06-21 at 05:39 +0000, James Im wrote:
> Trustin Lee wrote:
> >On 6/21/07, peter royal <[EMAIL PROTECTED]> wrote:
> >>On Jun 20, 2007, at 3:42 PM, Trustin Lee wrote:
> >> > What about putting the option in IoService?
> >> >
> >> > IoAcceptor acceptor = ..;
> >> > acceptor.setSessionAttributeMapFactory(new MyMapFactory());
> >> >
> >> > I thought about putting it to IoSessionConfig but the map can't be
> >> > changed once its created.
> >>
> >>good place for it. also makes me wonder if we should have a non-map
> >>interface that IoSession uses.. since we only have get/set/contains/
> >>keys, if we had a simple interface, it would be easy for people to
> >>back it by a highly optimized structure knowing it doesn't need full
> >>map semantics.
> >>
> >>or that could be premature optimization :)
> >
> >They can extend AbstractMap, no? ;)
> >
> >Trustin
> 
> It's nice to be able to plug a structure but I don't care about it so
> much. Mina should be distributed with the best Map available that:
> - doesn't cause any concurrency problems (visibility +
> synchronization)[priority 1]
> - consumes little memory [priority 2],
> - be fast [priority 3].
> 
> The best choice should be the default choice. Right now, the best choice
> for the Map that backs IOSession seems to be a java.util.HashMap with
> classic synchronization (according to Gato's tests).
> 
> Therefore, a better HasMap for session is one that doesn't consume more
> memory than java.util.HashMap AND/OR is faster.
> 
> 
> IMO, a framework that gives too many options is not necessarily a
> powerful framework, it only makes it more complex to use. A powerful
> framework is the one that is easy to use and does the job as efficiently
> as possible.
> 
> _________________________________________________________________
> Vlg selv hvordan du vil kommunikere - skrift, tale, video eller billeder 
> med MSN Messenger:  http://messenger.msn.dk/  - her kan du det hele
> 
-- 
Thank you in advance
        Roman.
*************************************************************************************
This e-mail is confidential, the property of NDS Ltd and intended for the 
addressee only.  Any dissemination, copying or distribution of this message or 
any attachments by anyone other than the intended recipient is strictly 
prohibited.  If you have received this message in error, please immediately 
notify the [EMAIL PROTECTED] and destroy the original message.  Messages sent 
to and from NDS may be monitored.  NDS cannot guarantee any message delivery 
method is secure or error-free.  Information could be intercepted, corrupted, 
lost, destroyed, arrive late or incomplete, or contain viruses.  We do not 
accept responsibility for any errors or omissions in this message and/or 
attachment that arise as a result of transmission.  You should carry out your 
own virus checks before opening any attachment.  Any views or opinions 
presented are solely those of the author and do not necessarily represent those 
of NDS.

To protect the environment please do not print this e-mail unless necessary.
**************************************************************************************

Reply via email to