You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Richard Emberson (JIRA)" <ji...@apache.org> on 2010/11/30 21:36:11 UTC

[jira] Created: (WICKET-3209) WebApplication MostRecentlyUsedMap based upon Key age not Value age

WebApplication MostRecentlyUsedMap based upon Key age not Value age
-------------------------------------------------------------------

                 Key: WICKET-3209
                 URL: https://issues.apache.org/jira/browse/WICKET-3209
             Project: Wicket
          Issue Type: Bug
          Components: wicket-auth-roles
    Affects Versions: 1.5-M3
         Environment: all
            Reporter: Richard Emberson
            Priority: Minor


The WebApplication uses the MostRecentlyUsedMap as a limited size cache. Elements of
the cache are removed when a new entry is added based upon the age of the element's keys
not on the age of the element's data.
Naively, I would expect a high usage element (one's whose associated data keeps changing)
should be kept in the cache rather than reaped - simply because it was enter earlier than some
low activity but more recent entry.
The MostRecentlyUsedMap is based upon the Java LinkedHashMap container. 
As such, it is not a very good fit for data-based age cache.
Of course I could be completely wrong in this case and it actually the age of the key that is
important not how often the data associated with the key is changed.

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


[jira] Assigned: (WICKET-3209) WebApplication MostRecentlyUsedMap based upon Key age not Value age

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

Martin Grigorov reassigned WICKET-3209:
---------------------------------------

    Assignee: Martin Grigorov

> WebApplication MostRecentlyUsedMap based upon Key age not Value age
> -------------------------------------------------------------------
>
>                 Key: WICKET-3209
>                 URL: https://issues.apache.org/jira/browse/WICKET-3209
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-auth-roles
>    Affects Versions: 1.5-M3
>         Environment: all
>            Reporter: Richard Emberson
>            Assignee: Martin Grigorov
>            Priority: Minor
>
> The WebApplication uses the MostRecentlyUsedMap as a limited size cache. Elements of
> the cache are removed when a new entry is added based upon the age of the element's keys
> not on the age of the element's data.
> Naively, I would expect a high usage element (one's whose associated data keeps changing)
> should be kept in the cache rather than reaped - simply because it was enter earlier than some
> low activity but more recent entry.
> The MostRecentlyUsedMap is based upon the Java LinkedHashMap container. 
> As such, it is not a very good fit for data-based age cache.
> Of course I could be completely wrong in this case and it actually the age of the key that is
> important not how often the data associated with the key is changed.

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


[jira] Commented: (WICKET-3209) WebApplication MostRecentlyUsedMap based upon Key age not Value age

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970508#action_12970508 ] 

Martin Grigorov commented on WICKET-3209:
-----------------------------------------

Now org.apache.wicket.protocol.http.WebApplication.storeBufferedResponse(String, Url, BufferedWebResponse) is being used.
The question is : do we need to use MostRecentlyUsedMap for the stored responses ? If YES, then we will need to clean it on session termination.

> WebApplication MostRecentlyUsedMap based upon Key age not Value age
> -------------------------------------------------------------------
>
>                 Key: WICKET-3209
>                 URL: https://issues.apache.org/jira/browse/WICKET-3209
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-auth-roles
>    Affects Versions: 1.5-M3
>         Environment: all
>            Reporter: Richard Emberson
>            Priority: Minor
>
> The WebApplication uses the MostRecentlyUsedMap as a limited size cache. Elements of
> the cache are removed when a new entry is added based upon the age of the element's keys
> not on the age of the element's data.
> Naively, I would expect a high usage element (one's whose associated data keeps changing)
> should be kept in the cache rather than reaped - simply because it was enter earlier than some
> low activity but more recent entry.
> The MostRecentlyUsedMap is based upon the Java LinkedHashMap container. 
> As such, it is not a very good fit for data-based age cache.
> Of course I could be completely wrong in this case and it actually the age of the key that is
> important not how often the data associated with the key is changed.

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


[jira] Resolved: (WICKET-3209) WebApplication MostRecentlyUsedMap based upon Key age not Value age

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

Martin Grigorov resolved WICKET-3209.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-M4

With r1049077 a special map is introduced which extends MostRecentlyUsedMap to be able to store at most N entries and additionally have the feature to expire its entries after a specified duration.

> WebApplication MostRecentlyUsedMap based upon Key age not Value age
> -------------------------------------------------------------------
>
>                 Key: WICKET-3209
>                 URL: https://issues.apache.org/jira/browse/WICKET-3209
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-auth-roles
>    Affects Versions: 1.5-M3
>         Environment: all
>            Reporter: Richard Emberson
>            Assignee: Martin Grigorov
>            Priority: Minor
>             Fix For: 1.5-M4
>
>
> The WebApplication uses the MostRecentlyUsedMap as a limited size cache. Elements of
> the cache are removed when a new entry is added based upon the age of the element's keys
> not on the age of the element's data.
> Naively, I would expect a high usage element (one's whose associated data keeps changing)
> should be kept in the cache rather than reaped - simply because it was enter earlier than some
> low activity but more recent entry.
> The MostRecentlyUsedMap is based upon the Java LinkedHashMap container. 
> As such, it is not a very good fit for data-based age cache.
> Of course I could be completely wrong in this case and it actually the age of the key that is
> important not how often the data associated with the key is changed.

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


[jira] Commented: (WICKET-3209) WebApplication MostRecentlyUsedMap based upon Key age not Value age

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970512#action_12970512 ] 

Martin Grigorov commented on WICKET-3209:
-----------------------------------------

These methods are the same thing - addBufferedResponse() is in 1.4 and storeBufferedResponse() is the same in 1.5. For some reason Matej (I guess) didn't use MostRecentlyUsedMap in the new implementation of this logic. The question is should we merge addBufferedResponse() and storeBufferedResponse() (i.e. add usage of MostRecentlyUsedMap in storeBufferedResponse()) or not. 

> WebApplication MostRecentlyUsedMap based upon Key age not Value age
> -------------------------------------------------------------------
>
>                 Key: WICKET-3209
>                 URL: https://issues.apache.org/jira/browse/WICKET-3209
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-auth-roles
>    Affects Versions: 1.5-M3
>         Environment: all
>            Reporter: Richard Emberson
>            Priority: Minor
>
> The WebApplication uses the MostRecentlyUsedMap as a limited size cache. Elements of
> the cache are removed when a new entry is added based upon the age of the element's keys
> not on the age of the element's data.
> Naively, I would expect a high usage element (one's whose associated data keeps changing)
> should be kept in the cache rather than reaped - simply because it was enter earlier than some
> low activity but more recent entry.
> The MostRecentlyUsedMap is based upon the Java LinkedHashMap container. 
> As such, it is not a very good fit for data-based age cache.
> Of course I could be completely wrong in this case and it actually the age of the key that is
> important not how often the data associated with the key is changed.

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


[jira] Commented: (WICKET-3209) WebApplication MostRecentlyUsedMap based upon Key age not Value age

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970511#action_12970511 ] 

Juergen Donnerstag commented on WICKET-3209:
--------------------------------------------

storedResponses is not using MostRecentlyUsedMap. MostRecentlyUsedMap  is only used in addBufferedResponse. And if addBufferedResponse is no longer used, than we should remove the method (and bufferedResponses) and close the issue.

> WebApplication MostRecentlyUsedMap based upon Key age not Value age
> -------------------------------------------------------------------
>
>                 Key: WICKET-3209
>                 URL: https://issues.apache.org/jira/browse/WICKET-3209
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-auth-roles
>    Affects Versions: 1.5-M3
>         Environment: all
>            Reporter: Richard Emberson
>            Priority: Minor
>
> The WebApplication uses the MostRecentlyUsedMap as a limited size cache. Elements of
> the cache are removed when a new entry is added based upon the age of the element's keys
> not on the age of the element's data.
> Naively, I would expect a high usage element (one's whose associated data keeps changing)
> should be kept in the cache rather than reaped - simply because it was enter earlier than some
> low activity but more recent entry.
> The MostRecentlyUsedMap is based upon the Java LinkedHashMap container. 
> As such, it is not a very good fit for data-based age cache.
> Of course I could be completely wrong in this case and it actually the age of the key that is
> important not how often the data associated with the key is changed.

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


[jira] Commented: (WICKET-3209) WebApplication MostRecentlyUsedMap based upon Key age not Value age

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970506#action_12970506 ] 

Juergen Donnerstag commented on WICKET-3209:
--------------------------------------------

Interestingly addBufferedResponse() is not used anywhere. Do we still need it?

> WebApplication MostRecentlyUsedMap based upon Key age not Value age
> -------------------------------------------------------------------
>
>                 Key: WICKET-3209
>                 URL: https://issues.apache.org/jira/browse/WICKET-3209
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-auth-roles
>    Affects Versions: 1.5-M3
>         Environment: all
>            Reporter: Richard Emberson
>            Priority: Minor
>
> The WebApplication uses the MostRecentlyUsedMap as a limited size cache. Elements of
> the cache are removed when a new entry is added based upon the age of the element's keys
> not on the age of the element's data.
> Naively, I would expect a high usage element (one's whose associated data keeps changing)
> should be kept in the cache rather than reaped - simply because it was enter earlier than some
> low activity but more recent entry.
> The MostRecentlyUsedMap is based upon the Java LinkedHashMap container. 
> As such, it is not a very good fit for data-based age cache.
> Of course I could be completely wrong in this case and it actually the age of the key that is
> important not how often the data associated with the key is changed.

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