ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mathieu Lirzin (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (OFBIZ-6747) Replace ConcurrentLinkedHashMap by Caffeine
Date Sat, 09 Jun 2018 09:38:00 GMT

    [ https://issues.apache.org/jira/browse/OFBIZ-6747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16506881#comment-16506881
] 

Mathieu Lirzin edited comment on OFBIZ-6747 at 6/9/18 9:37 AM:
---------------------------------------------------------------

I am not aware of the whole story and the rationale behind it, but I think OFBiz shouldn't
depend on non-standard libs like {{ConcurrentLinkedHashMap}} or {{Caffeine}}.  The reason
is that the framework should depend only the standard {{ConcurrentMap}} interface and should
let users choose the implementation of their choice.

To reduce the number of dependencies OFBiz should use one of the implementations from JavaSE
by default and  provide a way to plug those more performance focused implementations.  A factory
or any another configuration mechanism would make the job.


was (Author: mthl):
I am not aware about the whole story and the rationale behind it, but I think OFBiz shouldn't
depend on non-standard libs like {{ConcurrentLinkedHashMap}} or {{Caffeine}}.  The reason
is that the framework should depend only the standard {{ConcurrentMap}} interface and should
let users choose the implementation of their choice.

To reduce the number of dependencies OFBiz should use one of the implementations from JavaSE
by default and  provide a way to plug those more performance focused implementations.  A factory
or any another configuration mechanism would make the job.

> Replace ConcurrentLinkedHashMap by Caffeine
> -------------------------------------------
>
>                 Key: OFBIZ-6747
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6747
>             Project: OFBiz
>          Issue Type: Task
>            Reporter: Ben Manes
>            Assignee: Jacques Le Roux
>            Priority: Minor
>
> Similar to OFBIZ-3779, please consider upgrading the library used by [UtilCache|https://github.com/apache/ofbiz/blob/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java]
(v1.2). The current version is 1.4.2 and is the last major release planned.
> The preferable alternative would be to upgrade to [Caffeine|https://github.com/ben-manes/caffeine].
This is a Java 8 rewrite based on what I've learned since developing CLHM and Guava's cache.
As expected it provides [superior performance|https://github.com/ben-manes/caffeine/wiki/Benchmarks].
It also provides a [near optimal|https://github.com/ben-manes/caffeine/wiki/Efficiency] eviction
policy.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message