Re: [infinispan-dev] To Optional or not to Optional?

2017-05-25 Thread David M. Lloyd
I'm not an Infinispan developer, but I'll chime in anyway. :) I've never been a fan of Optional. But the theory behind it that made it acceptable in the first place is that it generally gets optimized away. Now this theory is only true if you never hold a reference to it in any persistent

Re: [infinispan-dev] if (trace) logger.tracef - it makes sense

2016-09-30 Thread David M. Lloyd
me important information in production just on the fly >>>> and switch it of to prevent from throtteling the server by that log >>>> statements or restart the server. >>>> We have the same issue in EAP but here a restart is not that bad as here >>>> y

Re: [infinispan-dev] if (trace) logger.tracef - it makes sense

2016-09-30 Thread David M. Lloyd
On 09/30/2016 01:53 AM, Sebastian Laskawiec wrote: > Hey! > > A while ago I asked Radim and Dan about these kind of constructs [1]: > > private boolean trace = logger.isTraceEnabled(); //stored in a field > > ... called in some method ... > if(trace) > logger.tracef(...); > ... > > At

Re: [infinispan-dev] JBoss Marshalling 1.4.4.Final + ASL + Infinispan 6

2014-03-05 Thread David M. Lloyd
On 03/05/2014 02:12 PM, Tristan Tarrant wrote: Dear all, David Lloyd has kindly release JBoss Marshalling 1.4.4.Final under the ASL: this means that all of our core deps are now ASL. Should we release a 6.0.2 with this dependency change only ? FWIW there's also a nice bugfix in there: the

Re: [infinispan-dev] Clean ThreadLocals

2013-12-11 Thread David M. Lloyd
On 12/11/2013 04:47 PM, Pedro Ruivo wrote: Hi, I've created a method to clean a specific ThreadLocal variable from all live threads [1]. My goal is to clean the ThreadLocal variables after a cache stops. It's kind expensive method (it uses reflection) but I think it is fine. Currently,

Re: [infinispan-dev] JBM version in ISPN 6.0

2013-09-20 Thread David M. Lloyd
On 09/20/2013 06:40 AM, Mircea Markus wrote: Hi guys, ISPN 6.0 final is scheduled for 11 Oct. Is there going to be an JBM 2.0 final release prior that date? Paul, what JBM version does 6.0 integration into AS? JBoss Marshalling 2.0 will have incompatible API changes that are not going to be

Re: [infinispan-dev] CHM or CHMv8?

2013-04-19 Thread David M. Lloyd
On 04/19/2013 05:17 AM, Sanne Grinovero wrote: On 19 April 2013 11:10, Dan Berindei dan.berin...@gmail.com wrote: On Fri, Apr 19, 2013 at 12:58 PM, Sanne Grinovero sa...@infinispan.org wrote: On 19 April 2013 10:37, Dan Berindei dan.berin...@gmail.com wrote: Testing mixed read/write

Re: [infinispan-dev] CHM or CHMv8?

2013-04-19 Thread David M. Lloyd
On 04/19/2013 08:22 AM, Sanne Grinovero wrote: On 19 April 2013 13:52, David M. Lloyd david.ll...@redhat.com wrote: On 04/19/2013 05:17 AM, Sanne Grinovero wrote: On 19 April 2013 11:10, Dan Berindei dan.berin...@gmail.com wrote: On Fri, Apr 19, 2013 at 12:58 PM, Sanne Grinovero sa

Re: [infinispan-dev] CHM or CHMv8?

2013-04-18 Thread David M. Lloyd
On 04/18/2013 09:35 PM, Manik Surtani wrote: Guys, Based on some recent micro benchmarks I've been doing, I've seen: MapStressTest configuration: capacity 10, test running time 60 seconds Testing mixed read/write performance with capacity 100,000, keys 300,000, concurrency level 32,

Re: [infinispan-dev] More verbose logging

2013-02-19 Thread David M. Lloyd
This is one reason why I recommend logging using categories versus class names. If you confine types of trace logging to specific categories which correspond to logical processes, then this allows the user to surgically select what information they wish to receive. It is very often the case

Re: [infinispan-dev] Avoid Collections.emptySet() / emptyMap() / emptyList

2012-10-22 Thread David M. Lloyd
On 10/22/2012 01:41 AM, Galder Zamarreño wrote: On Oct 19, 2012, at 7:20 PM, David M. Lloyd david.ll...@redhat.com wrote: Also be aware that JBMAR has specific optimizations for the JDK empty collections - they are represented by a single byte in the stream. Well, it's actually 3 bytes

Re: [infinispan-dev] Avoid Collections.emptySet() / emptyMap() / emptyList

2012-10-19 Thread David M. Lloyd
Also be aware that JBMAR has specific optimizations for the JDK empty collections - they are represented by a single byte in the stream. On 10/19/2012 11:28 AM, Dan Berindei wrote: Galder, what JDK are you using? OpenJDK 1.7 uses EmptyIterator.EMPTY_ITERATOR since 2007:

Re: [infinispan-dev] Double+ buffering during value marshalling

2012-08-28 Thread David M. Lloyd
All I can contribute is that you cannot really avoid buffering in the marshaller, because for user data it uses constructs of the form: length content You generally cannot know length without some form of buffering. There may be some optimizations which are possible that I haven't done

Re: [infinispan-dev] [jboss-as7-dev] AS7-4007 missing Infinispan dependency for clustered JPA second level cache

2012-03-06 Thread David M. Lloyd
for clustered JPA second level cache On 3/6/12 9:28 AM, David M. Lloyd wrote: On 03/06/2012 09:21 AM, Galder Zamarreño wrote: This reminds me that we had a discussion about this a few months back: http://goo.gl/DJLhB At the time, it wasn't clear whether you can use ModularClassResolver in a non-module

Re: [infinispan-dev] [jboss-as7-dev] AS7-4007 missing Infinispan dependency for clustered JPA second level cache

2012-03-06 Thread David M. Lloyd
On 03/06/2012 01:27 PM, Galder Zamarreño wrote: (***) I still don't fully understand how web apps don't have the same issue as 2LC of not seeing Infinispan classes (Reminder: we're not talking about the contents of the cache, but about the Infinispan classes themselves). It's possible that

Re: [infinispan-dev] JBoss Logging upgrade breaking build

2011-10-23 Thread David M. Lloyd
On 10/23/2011 03:20 AM, Galder Zamarreño wrote: Hi, This JBoss Logging upgrade is rather annoying for a couple of reasons: 1. IDE integration is broken: Before we had a JBoss Logging Processor as some dependency that allowed the logging processor to be found in the classpath. Now this is

Re: [infinispan-dev] JBoss Logging upgrade breaking build

2011-10-23 Thread David M. Lloyd
. On 10/23/2011 01:59 PM, David M. Lloyd wrote: On 10/23/2011 03:20 AM, Galder Zamarreño wrote: Hi, This JBoss Logging upgrade is rather annoying for a couple of reasons: 1. IDE integration is broken: Before we had a JBoss Logging Processor as some dependency that allowed the logging processor

Re: [infinispan-dev] Logger lookup performance

2011-08-08 Thread David M. Lloyd
On 08/08/2011 05:06 AM, Sanne Grinovero wrote: Hi all, raising some attention here on Pete's suggestions; over the weekend we fixed this bootstrap performance issue ISPN-1315, which I had given the name Reduce number of Logger instances being created, after looking at this profiler

Re: [infinispan-dev] New Logging rules!!! MUST READ

2011-06-28 Thread David M. Lloyd
On 06/28/2011 06:31 AM, Galder Zamarreño wrote: On Jun 21, 2011, at 11:54 AM, Manik Surtani wrote: On 27 Apr 2011, at 14:18, Galder Zamarreño wrote: Please note as well that this might require some IDE settings changes. I had to enable annotation processing in IntelliJ to be able to

Re: [infinispan-dev] Issue posted for JBoss Logging and slf4j

2011-06-20 Thread David M. Lloyd
On 06/20/2011 04:16 PM, Thomas P. Fuller wrote: I've had an issue upgrading to CR5 and I was just about to ask about this. Basically when running infinispan CR5 in Grails I am seeing log messages repeated two times whereas before upgrading I'd only see one. This is not a showstopper, but

Re: [infinispan-dev] Issue posted for JBoss Logging and slf4j

2011-06-20 Thread David M. Lloyd
are duplicated, and I just wrote a quite test application in Grails in complete isolation and the log messages only appear once. Regards, Tom *From:* David M. Lloyd david.ll...@redhat.com *To:* infinispan-dev@lists.jboss.org

Re: [infinispan-dev] Failure looking up the river marshaller under AS 7 environment

2011-05-31 Thread David M. Lloyd
Easiest solution is: Marshalling.getProvidedMarshallerFactory(river); This will always use the JBMAR class loader. Otherwise you would have to make sure that the module from which you load the river protocol imports the river module like this: dependencies ... module

Re: [infinispan-dev] Failure looking up the river marshaller under AS 7 environment

2011-05-31 Thread David M. Lloyd
. Let me create a JIRA issue and send a pull request soon. On 06/01/2011 01:47 AM, David M. Lloyd wrote: Easiest solution is: Marshalling.getProvidedMarshallerFactory(river); This will always use the JBMAR class loader. Otherwise you would have to make sure that the module from which you load

Re: [infinispan-dev] [Pull Request] Modular Classloading Compatibility

2011-05-05 Thread David M. Lloyd
On 05/05/2011 10:49 AM, David Bosschaert wrote: On 05/05/2011 10:55, Pete Muir wrote: I talked about this with Emmanuel last night, and we were a) concerned about the pollution of the API that this implies b) not sure why we need to do this So I also spoke to Jason to understand his initial

Re: [infinispan-dev] [Pull Request] Modular Classloading Compatibility

2011-05-03 Thread David M. Lloyd
On 05/03/2011 12:41 PM, Pete Muir wrote: On 2 May 2011, at 10:10, Manik Surtani wrote: On 1 May 2011, at 13:38, Pete Muir wrote: As in, user API? That's a little intrusive... e.g., put(K, V, cl) ? Not for put, since you have the class, just get, and I was thinking something more like:

Re: [infinispan-dev] cache name in logs

2011-04-29 Thread David M. Lloyd
I would just use NDC or MDC honestly. NDC.push(cacheName); try { do user stuff; } finally { NDC.pop(); } Similar if you want to use an MDC key. On 04/29/2011 09:55 AM, Galder Zamarreño wrote: On Apr 28, 2011, at 11:47 PM, Manik Surtani wrote: We do now support JBoss Logging.

Re: [infinispan-dev] @Marshallable as an option for end user externalizers?

2011-03-17 Thread David M. Lloyd
On 03/17/2011 05:43 AM, Manik Surtani wrote: On 17 Mar 2011, at 08:30, Galder Zamarreño wrote: Is it to do with classloader leaks? If so, a weak map could be used for this table... You misunderstood what I meant. By annotation scanning I meant that we won't be scanning the entire

[infinispan-dev] Marshaller implementation discovery

2010-12-27 Thread David M. Lloyd
Sanne Grinovero asked me to drop a quick note about the API used to discover JBoss Marshalling implementations. Since 1.2.0.GA, you can use the org.jboss.marshalling.Marshalling class methods to locate protocol implementations without involving a hard dependency in your sources. I've heard