You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Rainer Bieniek (JIRA)" <ji...@apache.org> on 2006/01/10 23:56:21 UTC

[jira] Created: (DIRMINA-162) datagram session management fails

datagram session management fails
---------------------------------

         Key: DIRMINA-162
         URL: http://issues.apache.org/jira/browse/DIRMINA-162
     Project: Directory MINA
        Type: Bug
    Versions: 0.9    
    Reporter: Rainer Bieniek
    Priority: Minor


As of mina 0.9.0 the session management does not work in various ways:
- a new session is created per received package. The worker thread does not cache created session but only assign the select key to the session and drops it after processing the package. It would be better to attach the session to the RegistrationRequest and check it while processing the received package.
- the provided IoFilterChainBuilder does get applied to the created datagram session. It is cached in the RegistrationRequest but not used on the session
- The sessionClose lifecycle event is not applied on the session either. 

-- 
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


[jira] Commented: (DIRMINA-162) datagram session management fails

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRMINA-162?page=comments#action_12364911 ] 

Trustin Lee commented on DIRMINA-162:
-------------------------------------

Your idea sounds very good.  Did you implement anything related with this?

> datagram session management fails
> ---------------------------------
>
>          Key: DIRMINA-162
>          URL: http://issues.apache.org/jira/browse/DIRMINA-162
>      Project: Directory MINA
>         Type: Bug
>     Versions: 0.9
>     Reporter: Rainer Bieniek
>     Priority: Minor

>
> As of mina 0.9.0 the session management does not work in various ways:
> - a new session is created per received package. The worker thread does not cache created session but only assign the select key to the session and drops it after processing the package. It would be better to attach the session to the RegistrationRequest and check it while processing the received package.
> - the provided IoFilterChainBuilder does get applied to the created datagram session. It is cached in the RegistrationRequest but not used on the session
> - The sessionClose lifecycle event is not applied on the session either. 

-- 
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


[jira] Commented: (DIRMINA-162) datagram session management fails

Posted by "Rainer Bieniek (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRMINA-162?page=comments#action_12364943 ] 

Rainer Bieniek commented on DIRMINA-162:
----------------------------------------

Yup. I have a working IoAcceptor, the IoConnector is planned but I didn't have time so far. I still need to polish the session timeout detection code but it works so far. Hopefully I can get this finished over the weekend.

> datagram session management fails
> ---------------------------------
>
>          Key: DIRMINA-162
>          URL: http://issues.apache.org/jira/browse/DIRMINA-162
>      Project: Directory MINA
>         Type: Bug
>     Versions: 0.9
>     Reporter: Rainer Bieniek
>     Priority: Minor

>
> As of mina 0.9.0 the session management does not work in various ways:
> - a new session is created per received package. The worker thread does not cache created session but only assign the select key to the session and drops it after processing the package. It would be better to attach the session to the RegistrationRequest and check it while processing the received package.
> - the provided IoFilterChainBuilder does get applied to the created datagram session. It is cached in the RegistrationRequest but not used on the session
> - The sessionClose lifecycle event is not applied on the session either. 

-- 
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


[jira] Commented: (DIRMINA-162) datagram session management fails

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRMINA-162?page=comments#action_12363059 ] 

Trustin Lee commented on DIRMINA-162:
-------------------------------------

sessionOpened and SessionClosed event is not applicable to connectionless transport types because there's no connection.

We also cannot maintain all IoSession instances because we don't know when it becomes inactive.  Perhaps we could give connectionless sessions some kind of 'lease' (timeout) to workaround this issue.  If there's no I/O for a certain period, the sessionClosed() event will be fired and the session will be disposed.  What do you think? 

> datagram session management fails
> ---------------------------------
>
>          Key: DIRMINA-162
>          URL: http://issues.apache.org/jira/browse/DIRMINA-162
>      Project: Directory MINA
>         Type: Bug
>     Versions: 0.9
>     Reporter: Rainer Bieniek
>     Priority: Minor

>
> As of mina 0.9.0 the session management does not work in various ways:
> - a new session is created per received package. The worker thread does not cache created session but only assign the select key to the session and drops it after processing the package. It would be better to attach the session to the RegistrationRequest and check it while processing the received package.
> - the provided IoFilterChainBuilder does get applied to the created datagram session. It is cached in the RegistrationRequest but not used on the session
> - The sessionClose lifecycle event is not applied on the session either. 

-- 
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


[jira] Commented: (DIRMINA-162) datagram session management fails

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRMINA-162?page=comments#action_12363212 ] 

Trustin Lee commented on DIRMINA-162:
-------------------------------------

This is a great idea.  We could provide a generic session tracking strategy interface so users can choose their favorite session management method.  For instance:

/** A kind of cache? */
public interface ConnectionlessSessionTracker {
    /**
     * @return null if no session is found
     */
    IoSession getSession( SocketAddress localAddress, SocketAddress remoteAddress );
}

WDYT?

> datagram session management fails
> ---------------------------------
>
>          Key: DIRMINA-162
>          URL: http://issues.apache.org/jira/browse/DIRMINA-162
>      Project: Directory MINA
>         Type: Bug
>     Versions: 0.9
>     Reporter: Rainer Bieniek
>     Priority: Minor

>
> As of mina 0.9.0 the session management does not work in various ways:
> - a new session is created per received package. The worker thread does not cache created session but only assign the select key to the session and drops it after processing the package. It would be better to attach the session to the RegistrationRequest and check it while processing the received package.
> - the provided IoFilterChainBuilder does get applied to the created datagram session. It is cached in the RegistrationRequest but not used on the session
> - The sessionClose lifecycle event is not applied on the session either. 

-- 
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


[jira] Commented: (DIRMINA-162) datagram session management fails

Posted by "Rainer Bieniek (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRMINA-162?page=comments#action_12363234 ] 

Rainer Bieniek commented on DIRMINA-162:
----------------------------------------

I already approached this but I found out that it will not work without a acceptor facade which encapsulates the "real" datagram acceptor and does the session tarcking on behalf of
the client. This thing is in fact second-next on my to-do list for my current project. 
Once this facade works, it can easily implement the proposed tracker interface. If it works, I will supply my implementation as a diff to mina-0.9.0

> datagram session management fails
> ---------------------------------
>
>          Key: DIRMINA-162
>          URL: http://issues.apache.org/jira/browse/DIRMINA-162
>      Project: Directory MINA
>         Type: Bug
>     Versions: 0.9
>     Reporter: Rainer Bieniek
>     Priority: Minor

>
> As of mina 0.9.0 the session management does not work in various ways:
> - a new session is created per received package. The worker thread does not cache created session but only assign the select key to the session and drops it after processing the package. It would be better to attach the session to the RegistrationRequest and check it while processing the received package.
> - the provided IoFilterChainBuilder does get applied to the created datagram session. It is cached in the RegistrationRequest but not used on the session
> - The sessionClose lifecycle event is not applied on the session either. 

-- 
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


[jira] Commented: (DIRMINA-162) datagram session management fails

Posted by "Rainer Bieniek (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRMINA-162?page=comments#action_12363082 ] 

Rainer Bieniek commented on DIRMINA-162:
----------------------------------------

I think you're right on the issue with sessions being opened / closed. Main thing is that only the higher level protocol (on top of UDP) can really determine the meaning of a
'session' in its very own context. It might be possible to design some kind of protocol filter which implements generic session tracking on top of simple message delivery by:
- tracking received message from the remote peer and fire off a sessionOpened() event BEFORE passing the message onto the next filter in the chain
- implement a timeout-based mechanism that tracks the data messages passing through and closes the session if the timeout passes by (including firing the event)
But it does not seem feasible to implement this as a generic behauviour of the datagram acceptor (as there are protocol which do not have the concept of a session at all)

But I do think that it is a bug in the implementation of the datagram acceptor if it does not assembly the filter chains when the individual session get create. I understand that it is currently needed ot create a session per received message but it should then assemble the filter chain per session as one should expect from the documentation. It would then be 
necessary to document this as an user might need to take special precautions in this chain builder implementation.

> datagram session management fails
> ---------------------------------
>
>          Key: DIRMINA-162
>          URL: http://issues.apache.org/jira/browse/DIRMINA-162
>      Project: Directory MINA
>         Type: Bug
>     Versions: 0.9
>     Reporter: Rainer Bieniek
>     Priority: Minor

>
> As of mina 0.9.0 the session management does not work in various ways:
> - a new session is created per received package. The worker thread does not cache created session but only assign the select key to the session and drops it after processing the package. It would be better to attach the session to the RegistrationRequest and check it while processing the received package.
> - the provided IoFilterChainBuilder does get applied to the created datagram session. It is cached in the RegistrationRequest but not used on the session
> - The sessionClose lifecycle event is not applied on the session either. 

-- 
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