You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Trustin Lee (JIRA)" <ji...@apache.org> on 2007/07/05 07:09:04 UTC

[jira] Created: (DIRMINA-393) Allow users to choose a Map implementation for storing session attributes.

Allow users to choose a Map implementation for storing session attributes.
--------------------------------------------------------------------------

                 Key: DIRMINA-393
                 URL: https://issues.apache.org/jira/browse/DIRMINA-393
             Project: MINA
          Issue Type: New Feature
          Components: Core
            Reporter: Trustin Lee
            Priority: Minor
             Fix For: 2.0.0-M1


Currently, users don't have any control over how session attributes are stored and managed.  Adding SessionAttributesMapFactory property to IoService will give more control to the users, although we will have to provide the best generic implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (DIRMINA-393) Allow users to choose a Map implementation for storing session attributes.

Posted by Mark <el...@gmail.com>.
I agree Mike.  I can understand supporting a user-defined Map, but the 2 MB
per session sound like alot.


On 7/16/07, Mike Heath (JIRA) <ji...@apache.org> wrote:
>
>
>     [
> https://issues.apache.org/jira/browse/DIRMINA-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512997]
>
> Mike Heath commented on DIRMINA-393:
> ------------------------------------
>
> Is there really a need to store that much data in your session attributes?
>
> > Allow users to choose a Map implementation for storing session
> attributes.
> >
> --------------------------------------------------------------------------
> >
> >                 Key: DIRMINA-393
> >                 URL: https://issues.apache.org/jira/browse/DIRMINA-393
> >             Project: MINA
> >          Issue Type: New Feature
> >          Components: Core
> >            Reporter: Trustin Lee
> >            Priority: Minor
> >             Fix For: 2.0.0-M1
> >
> >
> > Currently, users don't have any control over how session attributes are
> stored and managed.  Adding SessionAttributesMapFactory property to
> IoService will give more control to the users, although we will have to
> provide the best generic implementation.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>


-- 
..Cheers
Mark

[jira] Commented: (DIRMINA-393) Allow users to choose a Map implementation for storing session attributes.

Posted by "Mike Heath (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRMINA-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512997 ] 

Mike Heath commented on DIRMINA-393:
------------------------------------

Is there really a need to store that much data in your session attributes?

> Allow users to choose a Map implementation for storing session attributes.
> --------------------------------------------------------------------------
>
>                 Key: DIRMINA-393
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-393
>             Project: MINA
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Trustin Lee
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> Currently, users don't have any control over how session attributes are stored and managed.  Adding SessionAttributesMapFactory property to IoService will give more control to the users, although we will have to provide the best generic implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DIRMINA-393) Allow users to choose a Map implementation for storing session attributes.

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRMINA-393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny closed DIRMINA-393.
-------------------------------------


> Allow users to choose a Map implementation for storing session attributes.
> --------------------------------------------------------------------------
>
>                 Key: DIRMINA-393
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-393
>             Project: MINA
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Trustin Lee
>            Assignee: Trustin Lee
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> Currently, users don't have any control over how session attributes are stored and managed.  Adding SessionAttributesMapFactory property to IoService will give more control to the users, although we will have to provide the best generic implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DIRMINA-393) Allow users to choose a Map implementation for storing session attributes.

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRMINA-393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Trustin Lee resolved DIRMINA-393.
---------------------------------

    Resolution: Fixed
      Assignee: Trustin Lee

The following interfaces has been added:

* IoSessionAttributeMap
* IoSessionAttributeMapFactory

In the recent discussion, we decided to use existing java.util.ConcurrentMap interface, but I realized it's not possible due to the following reasons:

* There's no way to release any resources that might have allocated from the factory -> I added dispose() method.
* One attribute map instance might want to handle all session attribute request. -> I added IoSession parameter to all access methods.

The default IoSessionAttributeMapFactory is almost identical with the previous implementation.

You can set your own session attribute map factory by calling IoService.setSessionAttributeMapFactory(...).  I know it's long, but I couldn't think of any better name.

> Allow users to choose a Map implementation for storing session attributes.
> --------------------------------------------------------------------------
>
>                 Key: DIRMINA-393
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-393
>             Project: MINA
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Trustin Lee
>            Assignee: Trustin Lee
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> Currently, users don't have any control over how session attributes are stored and managed.  Adding SessionAttributesMapFactory property to IoService will give more control to the users, although we will have to provide the best generic implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRMINA-393) Allow users to choose a Map implementation for storing session attributes.

Posted by "Yueyu Lin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRMINA-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512960 ] 

Yueyu Lin commented on DIRMINA-393:
-----------------------------------

It's extremely useful for many applications!
For an example, if you want to implement a GoogleFileSystem like system, you need to synchronize huge data packets within several chunk servers.
Suppose, if every request attribute size is larger than 2 mega bytes and you have to handle 1k clients(of course, this is not the chunk server scenario), the sessions attributes will consume 2000 mega memory!
If the Map can be implemented by users, users may adopt other memory/disk swap technology to handle these cases. I have experience to do this kind of jobs.  I use the BerkerlyDB java edition to do this.  It will be excited to add this feature into Mina. If it does happen, Mina is really for multi-purpose.
If there is no one else to pick up this job, I guess I can participate to do this and implement the JE map edition for Mina.

> Allow users to choose a Map implementation for storing session attributes.
> --------------------------------------------------------------------------
>
>                 Key: DIRMINA-393
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-393
>             Project: MINA
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Trustin Lee
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> Currently, users don't have any control over how session attributes are stored and managed.  Adding SessionAttributesMapFactory property to IoService will give more control to the users, although we will have to provide the best generic implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRMINA-393) Allow users to choose a Map implementation for storing session attributes.

Posted by "Yueyu Lin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRMINA-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513119 ] 

Yueyu Lin commented on DIRMINA-393:
-----------------------------------

Sometimes, it's needed. Especially when you developed an application server framework that is used by other developers.
You usually told them send an request and add handler to deal with the response. Most of them don't have much knowledge for the request size. Some of them may send huge requests because they think your application server can handle them. If the server cannot take this kind of burden to throw OutOfMemoryException, your whole app server framework will be complained. I agree in fact, in the user level, they can control the request size to simply split big requests to small requests. But some developers may not be happy if you ask them to do it manually.

> Allow users to choose a Map implementation for storing session attributes.
> --------------------------------------------------------------------------
>
>                 Key: DIRMINA-393
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-393
>             Project: MINA
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Trustin Lee
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> Currently, users don't have any control over how session attributes are stored and managed.  Adding SessionAttributesMapFactory property to IoService will give more control to the users, although we will have to provide the best generic implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.