[jira] [Commented] (OFBIZ-6747) Replace ConcurrentLinkedHashMap by Caffeine

2018-06-09 Thread Ben Manes (JIRA)


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

Ben Manes commented on OFBIZ-6747:
--

The two libraries do share a compatible interface via {{ConcurrentMap}}. That 
is the interface for {{ConcurrentLinkedHashMap}} and provided by Caffeine's 
{{Cache.asMap()}} view. You are welcome to abstract out caching as you see fit, 
as neither are invasive (e.g. no singleton {{CacheManager}} or configuration 
files - those are for applications to introduce and manage).

{{ConcurrentLinkedHashMap}} was written for Java 5, so it does not provide 
atomic versions of the new default methods such as {{computeIfAbsent}}. I 
believe that the copy embedded by Groovy did add this, if you want to follow 
their example. The library is tiny, so many brought it under their own umbrella 
to avoid external dependencies (e.g. another example is SQL Server's JDBC 
driver).

Unfortunately most other caching libraries do no support {{ConcurrentMap}}, so 
bridging them might be difficult. You may instead prefer to have a custom 
{{Cache}} interface with only the methods your project finds useful to minimize 
the effort. Another option is {{JSR107 JCache}} but be warned that it is 
riddled with problems, highly flawed, and results in a very frustrating 
developer experience. While the JSR was approved, it was rejected by JavaEE 
(both EE7 and EE8) and not widely adopted by consuming frameworks / 
applications.

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


[jira] [Commented] (OFBIZ-6747) Replace ConcurrentLinkedHashMap by Caffeine

2018-06-09 Thread Taher Alkhateeb (JIRA)


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

Taher Alkhateeb commented on OFBIZ-6747:


I am also in favor of Mathieu's approach. I assume the two libraries are not 
compatible in their APIs (hence the reason for the re-write)

So I think it is better to redirect the effort towards moving the 
implementation to the pure standard JVM. I am going to study the code to see 
whether this is doable

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


[jira] [Closed] (OFBIZ-10367) Add Support for Disable attribute in CheckBox Form Widget

2018-06-09 Thread Rishi Solanki (JIRA)


 [ 
https://issues.apache.org/jira/browse/OFBIZ-10367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rishi Solanki closed OFBIZ-10367.
-

> Add Support for Disable attribute in CheckBox Form Widget
> -
>
> Key: OFBIZ-10367
> URL: https://issues.apache.org/jira/browse/OFBIZ-10367
> Project: OFBiz
>  Issue Type: Improvement
>  Components: framework
>Affects Versions: Trunk
>Reporter: Pawan Verma
>Assignee: Rishi Solanki
>Priority: Minor
> Fix For: Upcoming Branch
>
> Attachments: OFBIZ-10367.patch
>
>
> While working on the Inventory Transfer improvements, I have found that there 
> should be support in CheckBox form-widget to disable a checkbox. There might 
> be several use cases for this, I am listing one below:
> Use Case: A screen list all the requirement out of which only Approved 
> Requirement is allowed to perform some action and other should not be allowed 
> to select. 
> To support this type of case there should be a support to disable a 
> form-widget checkbox.
>  



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


[jira] [Resolved] (OFBIZ-10367) Add Support for Disable attribute in CheckBox Form Widget

2018-06-09 Thread Rishi Solanki (JIRA)


 [ 
https://issues.apache.org/jira/browse/OFBIZ-10367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rishi Solanki resolved OFBIZ-10367.
---
   Resolution: Fixed
Fix Version/s: Upcoming Branch

[~pawan.verma]: Your work has been committed in trunk revision 1833231. Thanks 
for your contribution. Thanks [~jamesyong] for testing the work.

> Add Support for Disable attribute in CheckBox Form Widget
> -
>
> Key: OFBIZ-10367
> URL: https://issues.apache.org/jira/browse/OFBIZ-10367
> Project: OFBiz
>  Issue Type: Improvement
>  Components: framework
>Affects Versions: Trunk
>Reporter: Pawan Verma
>Assignee: Rishi Solanki
>Priority: Minor
> Fix For: Upcoming Branch
>
> Attachments: OFBIZ-10367.patch
>
>
> While working on the Inventory Transfer improvements, I have found that there 
> should be support in CheckBox form-widget to disable a checkbox. There might 
> be several use cases for this, I am listing one below:
> Use Case: A screen list all the requirement out of which only Approved 
> Requirement is allowed to perform some action and other should not be allowed 
> to select. 
> To support this type of case there should be a support to disable a 
> form-widget checkbox.
>  



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


[jira] [Commented] (OFBIZ-6747) Replace ConcurrentLinkedHashMap by Caffeine

2018-06-09 Thread Jacques Le Roux (JIRA)


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

Jacques Le Roux commented on OFBIZ-6747:


Good point Mathieu,

For history: [~doogie] was at the initiative: https://s.apache.org/b465 then 
OFBIZ-3779

For the rest I agree, it just needs an effort I don't want currently put into 
:) (other priorities, even in OFBiz)

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


[jira] [Comment Edited] (OFBIZ-6747) Replace ConcurrentLinkedHashMap by Caffeine

2018-06-09 Thread Mathieu Lirzin (JIRA)


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

Mathieu Lirzin edited comment on OFBIZ-6747 at 6/9/18 9:39 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 other configuration 
mechanism would make the job.


was (Author: mthl):
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.

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


[jira] [Comment Edited] (OFBIZ-6747) Replace ConcurrentLinkedHashMap by Caffeine

2018-06-09 Thread Mathieu Lirzin (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-6747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)


[jira] [Commented] (OFBIZ-6747) Replace ConcurrentLinkedHashMap by Caffeine

2018-06-09 Thread Mathieu Lirzin (JIRA)


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

Mathieu Lirzin commented on OFBIZ-6747:
---

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)


[jira] [Updated] (OFBIZ-6747) Replace ConcurrentLinkedHashMap by Caffeine

2018-06-09 Thread Jacques Le Roux (JIRA)


 [ 
https://issues.apache.org/jira/browse/OFBIZ-6747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jacques Le Roux updated OFBIZ-6747:
---
Summary: Replace ConcurrentLinkedHashMap by Caffeine  (was: Upgrade 
ConcurrentLinkedHashMap)

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


[jira] [Commented] (OFBIZ-6747) Replace ConcurrentLinkedHashMap by Caffeine

2018-06-09 Thread Jacques Le Roux (JIRA)


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

Jacques Le Roux commented on OFBIZ-6747:


To clarify the issue, I changed the title from "Upgrade 
ConcurrentLinkedHashMap" to "Replace ConcurrentLinkedHashMap by Caffeine"

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


[jira] [Reopened] (OFBIZ-6747) Upgrade ConcurrentLinkedHashMap

2018-06-09 Thread Jacques Le Roux (JIRA)


 [ 
https://issues.apache.org/jira/browse/OFBIZ-6747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jacques Le Roux reopened OFBIZ-6747:


Ah wait, you mentionned Caffeine. We should have a look at it indeed!

> Upgrade ConcurrentLinkedHashMap
> ---
>
> 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)


[jira] [Closed] (OFBIZ-6747) Upgrade ConcurrentLinkedHashMap

2018-06-09 Thread Jacques Le Roux (JIRA)


 [ 
https://issues.apache.org/jira/browse/OFBIZ-6747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jacques Le Roux closed OFBIZ-6747.
--
Resolution: Not A Problem

Hi Ben,

Thanks to your excellent dependencyUpdates Gradle plugin I can say that we are 
up to date at least in in trunk.

I'll discuss with the community the opportunity of also upgrading libs (not 
only concurrentlinkedhashmap) in release branches...

> Upgrade ConcurrentLinkedHashMap
> ---
>
> 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)


[jira] [Assigned] (OFBIZ-6747) Upgrade ConcurrentLinkedHashMap

2018-06-09 Thread Jacques Le Roux (JIRA)


 [ 
https://issues.apache.org/jira/browse/OFBIZ-6747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jacques Le Roux reassigned OFBIZ-6747:
--

Assignee: Jacques Le Roux

> Upgrade ConcurrentLinkedHashMap
> ---
>
> 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)