You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by fe...@gmail.com on 2005/12/14 19:47:31 UTC

[mina] Re: [jira] Commented: (DIRMINA-42) SessionManagers should manage list of sessions being managed.

I thought many other things about DIRMINA-42:
-> A single IoAcceptor can manage (and bind/unbind) many localSocketAddress, 
so when we unbind only one of them we have to disconnect only the IoSessions 
correlated to that SocketAddress (DIRMINA-93). Because of this is good to 
mantain a IoSessionMap for each binded service in IoAcceptor.
-> The choice between hashMap or simple collection is interesting, but many 
codes can be developed in the same manner, so i begun to write down some 
interfaces and some patches to mina9.0 code, patching the tcp packages 
especially.

May I send that codes on jira? I read something about the Apache License, 
have I to modifie the code, apply some introduction to each class?

Sorry for all that question, Niklas Therning, I hope I do not disturb you 
too much.

by Fedechicco



----- Original Message ----- 
From: "Federico Bonelli (JIRA)" <ji...@apache.org>
To: <de...@directory.apache.org>
Sent: Tuesday, December 13, 2005 11:34 PM
Subject: [jira] Commented: (DIRMINA-42) SessionManagers should manage list 
of sessions being managed.


>    [ 
> http://issues.apache.org/jira/browse/DIRMINA-42?page=comments#action_12360367 ]
>
> Federico Bonelli commented on DIRMINA-42:
> -----------------------------------------
>
> Yes, I planned to work it out because I need to resolve DIRMINA-93 for my 
> applications.
>
> Well, I'd like to work at this, but I'm new to team-development tecnique 
> (I always worked alone), so I need a large amount of tips, i'd like to 
> discuss every single choice.
>
> I was thinking about that, about the hashMap vs Collection, and I don't 
> know. I have many structure that need of a unique identifier that match 
> every single connection, in my applications, but for every application my 
> key is different.
>
> I'm thinking about an ftp server that need of couple nick-ipaddr, about a 
> chat server that need only ipaddr before login, then the nick after login, 
> the neededs of every application is protocol specified...
>
> For mina purpouse only (DIRMINA-93) a collection is all we need, but if we 
> want to make this IoSessionMap usable for the highlevel application we 
> need to develop a userdefinable hashing, pointing to our own collection, 
> or maybe to another parallel mina-useless data structure dedicated for 
> user-usage (that's the goal of DIRMINA-42)
>
> So the key problem is worse then I thougth. What do you think about it?
>
>> SessionManagers should manage list of sessions being managed.
>> -------------------------------------------------------------
>>
>>          Key: DIRMINA-42
>>          URL: http://issues.apache.org/jira/browse/DIRMINA-42
>>      Project: Directory MINA
>>         Type: New Feature
>>     Versions: 0.7
>>     Reporter: Trustin Lee
>>     Assignee: Niklas Therning
>>      Fix For: 0.9.1
>
>>
>> Users are maintaining the list of managed sessions in acceptors and 
>> connectors.  It will be much better if MINA can handle this.
>
> -- 
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
>   http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>   http://www.atlassian.com/software/jira
> 


Re: [mina] Re: [jira] Commented: (DIRMINA-42) SessionManagers should manage list of sessions being managed.

Posted by Niklas Therning <ni...@trillian.se>.
fedechicco@gmail.com wrote:
> I thought many other things about DIRMINA-42:
> -> A single IoAcceptor can manage (and bind/unbind) many
> localSocketAddress, so when we unbind only one of them we have to
> disconnect only the IoSessions correlated to that SocketAddress
> (DIRMINA-93). Because of this is good to mantain a IoSessionMap for each
> binded service in IoAcceptor.

Yes, the IoAcceptors whould definitely need to maintain a Map of
IoSessions with the local address (the port bound to) as key. I'm not
sure if this Map would have to be exposed to others though. Maybe it's
better to have a method with the signature

Collection getSessions(SocketAddress)

in IoAcceptor.

One problem is what to do with IoConnectors. They are IoSessionManagers
as well. In that case it's not as obvious what should be the key in the
Map. I'm not sure if we need IoConnectors to maintain a list of
sessions. Maybe we could skip that for know?

> -> The choice between hashMap or simple collection is interesting, but
> many codes can be developed in the same manner, so i begun to write down
> some interfaces and some patches to mina9.0 code, patching the tcp
> packages especially.

Great!

> May I send that codes on jira? I read something about the Apache
> License, have I to modifie the code, apply some introduction to each class?

Yes of course, please attach the code to the JIRA issue. The coding
conventions used by MINA are described on

http://directory.apache.org/community/process/code-standards.html

I'm not sure if it's 100% up to date. I also have coding style and
formatting files which you can use with Eclipse. I will send them to you
off list.

/Niklas