From galder at redhat.com Wed Aug 3 03:22:16 2016 From: galder at redhat.com (=?utf-8?Q?Galder_Zamarre=C3=B1o?=) Date: Wed, 3 Aug 2016 09:22:16 +0200 Subject: [infinispan-dev] Video for DevNation talk on JBoss Data Grid, Node.js and Elm available now Message-ID: <6B11A2D1-07C0-4013-983B-0E8FD524A57F@redhat.com> Hi all, The video of the talk Dyvia and I gave on building reactive apps with JBoss Data Grid 7, Node.js and Elm that we gave at DevNation is now available online: http://developers.redhat.com/video/youtube/ebUbzrpCuTA/ Enjoy! -- Galder Zamarre?o Infinispan, Red Hat From galder at redhat.com Wed Aug 3 03:49:07 2016 From: galder at redhat.com (=?utf-8?Q?Galder_Zamarre=C3=B1o?=) Date: Wed, 3 Aug 2016 09:49:07 +0200 Subject: [infinispan-dev] Video for DevNation talk on auto-scaling Infinispan with Kubernetes Message-ID: Hi all, More amazing videos coming out of DevNation 2016, this time with the amazing Ray Tsang showing how to auto-scale Infinispan with Kubernetes: http://developers.redhat.com/video/youtube/E4ACZ6_WDyo/ Enjoy! -- Galder Zamarre?o Infinispan, Red Hat From slaskawi at redhat.com Wed Aug 3 05:08:43 2016 From: slaskawi at redhat.com (Sebastian Laskawiec) Date: Wed, 3 Aug 2016 11:08:43 +0200 Subject: [infinispan-dev] Video for DevNation talk on auto-scaling Infinispan with Kubernetes In-Reply-To: References: Message-ID: Thanks Galder for this finding! Just a small comment on things which are not obvious - Ray created his own custom autoscaler implementation. Both OpenShift and Kubernetes have support for so called Custom Metrics [1][2] which you can use for autoscaling. However, trying to scale based on the memory consumption is a tricky business [3][4]. I've been talking with Andrew about this and he says that settings `-Xms` to some low value and `-Xmx` reasonably high might do the trick. When you add a node to the cluster (assuming only DIST caches) the total amount of used memory in the Pods will (possibly) drop after some time. This however might not work for CMS GC. Anyway - those are the things which are on my plate for this and next week. Once I have some results I would be glad to share them with you. And as always - any help with this would be highly appreciated. Thanks Sebastian [1] https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/custom-metrics.md [2] https://github.com/openshift/origin-metrics [3] https://developerblog.redhat.com/2014/07/15/dude-wheres-my-paas-memory-tuning-javas-footprint-in-openshift-part-1/ [4] https://developerblog.redhat.com/2014/07/22/dude-wheres-my-paas-memory-tuning-javas-footprint-in-openshift-part-2/ On Wed, Aug 3, 2016 at 9:49 AM, Galder Zamarre?o wrote: > Hi all, > > More amazing videos coming out of DevNation 2016, this time with the > amazing Ray Tsang showing how to auto-scale Infinispan with Kubernetes: > http://developers.redhat.com/video/youtube/E4ACZ6_WDyo/ > > Enjoy! > -- > Galder Zamarre?o > Infinispan, Red Hat > > > _______________________________________________ > infinispan-dev mailing list > infinispan-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/infinispan-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20160803/31088984/attachment.html From slaskawi at redhat.com Wed Aug 3 05:13:58 2016 From: slaskawi at redhat.com (Sebastian Laskawiec) Date: Wed, 3 Aug 2016 11:13:58 +0200 Subject: [infinispan-dev] Video for DevNation talk on JBoss Data Grid, Node.js and Elm available now In-Reply-To: <6B11A2D1-07C0-4013-983B-0E8FD524A57F@redhat.com> References: <6B11A2D1-07C0-4013-983B-0E8FD524A57F@redhat.com> Message-ID: Awesome! Good stuff! On Wed, Aug 3, 2016 at 9:22 AM, Galder Zamarre?o wrote: > Hi all, > > The video of the talk Dyvia and I gave on building reactive apps with > JBoss Data Grid 7, Node.js and Elm that we gave at DevNation is now > available online: http://developers.redhat.com/video/youtube/ebUbzrpCuTA/ > > Enjoy! > -- > Galder Zamarre?o > Infinispan, Red Hat > > > _______________________________________________ > infinispan-dev mailing list > infinispan-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/infinispan-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20160803/fe95688a/attachment.html From galder at redhat.com Wed Aug 3 05:16:52 2016 From: galder at redhat.com (=?utf-8?Q?Galder_Zamarre=C3=B1o?=) Date: Wed, 3 Aug 2016 11:16:52 +0200 Subject: [infinispan-dev] Video for DevNation talk on auto-scaling Infinispan with Kubernetes In-Reply-To: References: Message-ID: <0A08602A-85C9-4CB6-862A-758B6464B101@redhat.com> Hey Sebastian, Yeah, as Ray rightly says in the video, his approach is based on old Kubernetes versions, and so the current status might be different. What about you write up a blog with a link to the video and you explain the best practices or more recent approaches that we're using these days? A comparison might be handy for our users to better understand the concepts. WDYT? Cheers, -- Galder Zamarre?o Infinispan, Red Hat > On 3 Aug 2016, at 11:08, Sebastian Laskawiec wrote: > > Thanks Galder for this finding! > > Just a small comment on things which are not obvious - Ray created his own custom autoscaler implementation. Both OpenShift and Kubernetes have support for so called Custom Metrics [1][2] which you can use for autoscaling. > > However, trying to scale based on the memory consumption is a tricky business [3][4]. I've been talking with Andrew about this and he says that settings `-Xms` to some low value and `-Xmx` reasonably high might do the trick. When you add a node to the cluster (assuming only DIST caches) the total amount of used memory in the Pods will (possibly) drop after some time. This however might not work for CMS GC. > > Anyway - those are the things which are on my plate for this and next week. Once I have some results I would be glad to share them with you. > > And as always - any help with this would be highly appreciated. > > Thanks > Sebastian > > [1] https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/custom-metrics.md > [2] https://github.com/openshift/origin-metrics > [3] https://developerblog.redhat.com/2014/07/15/dude-wheres-my-paas-memory-tuning-javas-footprint-in-openshift-part-1/ > [4] https://developerblog.redhat.com/2014/07/22/dude-wheres-my-paas-memory-tuning-javas-footprint-in-openshift-part-2/ > > > On Wed, Aug 3, 2016 at 9:49 AM, Galder Zamarre?o wrote: > Hi all, > > More amazing videos coming out of DevNation 2016, this time with the amazing Ray Tsang showing how to auto-scale Infinispan with Kubernetes: > http://developers.redhat.com/video/youtube/E4ACZ6_WDyo/ > > Enjoy! > -- > Galder Zamarre?o > Infinispan, Red Hat > > > _______________________________________________ > infinispan-dev mailing list > infinispan-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/infinispan-dev > > _______________________________________________ > infinispan-dev mailing list > infinispan-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/infinispan-dev From slaskawi at redhat.com Wed Aug 3 05:26:59 2016 From: slaskawi at redhat.com (Sebastian Laskawiec) Date: Wed, 3 Aug 2016 11:26:59 +0200 Subject: [infinispan-dev] Video for DevNation talk on auto-scaling Infinispan with Kubernetes In-Reply-To: <0A08602A-85C9-4CB6-862A-758B6464B101@redhat.com> References: <0A08602A-85C9-4CB6-862A-758B6464B101@redhat.com> Message-ID: That's a good idea, but let me first figure out how to do it properly (and make sure it works as I expect)... On Wed, Aug 3, 2016 at 11:16 AM, Galder Zamarre?o wrote: > Hey Sebastian, > > Yeah, as Ray rightly says in the video, his approach is based on old > Kubernetes versions, and so the current status might be different. > > What about you write up a blog with a link to the video and you explain > the best practices or more recent approaches that we're using these days? A > comparison might be handy for our users to better understand the concepts. > > WDYT? > > Cheers, > -- > Galder Zamarre?o > Infinispan, Red Hat > > > On 3 Aug 2016, at 11:08, Sebastian Laskawiec > wrote: > > > > Thanks Galder for this finding! > > > > Just a small comment on things which are not obvious - Ray created his > own custom autoscaler implementation. Both OpenShift and Kubernetes have > support for so called Custom Metrics [1][2] which you can use for > autoscaling. > > > > However, trying to scale based on the memory consumption is a tricky > business [3][4]. I've been talking with Andrew about this and he says that > settings `-Xms` to some low value and `-Xmx` reasonably high might do the > trick. When you add a node to the cluster (assuming only DIST caches) the > total amount of used memory in the Pods will (possibly) drop after some > time. This however might not work for CMS GC. > > > > Anyway - those are the things which are on my plate for this and next > week. Once I have some results I would be glad to share them with you. > > > > And as always - any help with this would be highly appreciated. > > > > Thanks > > Sebastian > > > > [1] > https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/custom-metrics.md > > [2] https://github.com/openshift/origin-metrics > > [3] > https://developerblog.redhat.com/2014/07/15/dude-wheres-my-paas-memory-tuning-javas-footprint-in-openshift-part-1/ > > [4] > https://developerblog.redhat.com/2014/07/22/dude-wheres-my-paas-memory-tuning-javas-footprint-in-openshift-part-2/ > > > > > > On Wed, Aug 3, 2016 at 9:49 AM, Galder Zamarre?o > wrote: > > Hi all, > > > > More amazing videos coming out of DevNation 2016, this time with the > amazing Ray Tsang showing how to auto-scale Infinispan with Kubernetes: > > http://developers.redhat.com/video/youtube/E4ACZ6_WDyo/ > > > > Enjoy! > > -- > > Galder Zamarre?o > > Infinispan, Red Hat > > > > > > _______________________________________________ > > infinispan-dev mailing list > > infinispan-dev at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/infinispan-dev > > > > _______________________________________________ > > infinispan-dev mailing list > > infinispan-dev at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/infinispan-dev > > > _______________________________________________ > infinispan-dev mailing list > infinispan-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/infinispan-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20160803/13d4a7a2/attachment-0001.html From galder at redhat.com Wed Aug 3 05:57:17 2016 From: galder at redhat.com (=?utf-8?Q?Galder_Zamarre=C3=B1o?=) Date: Wed, 3 Aug 2016 11:57:17 +0200 Subject: [infinispan-dev] Sequential interceptors API In-Reply-To: <576AB428.10203@redhat.com> References: <57580E54.10703@redhat.com> <8BD560BF-0F3E-4CC8-843C-EB54F5410877@redhat.com> <576AB428.10203@redhat.com> Message-ID: <79B0BF43-E05B-44CF-BC9C-2E534B55C5BB@redhat.com> Hey Radim, Sorry for the delay having a look at this (Summit/DevNation then vacation). I agree with you that the way you're passing down the handler down the stack and accross lambdas is a bit counter-productive, because it means the lambda has to capture the handler, which in turn means that each lambda execution will result in a lambda instantiation. Looking at AsyncInvocationContext, methods like this feel a bit of an anti-pattern: CompletableFuture forkInvocation(VisitableCommand newCommand, AsyncInterceptor.ForkReturnHandler forkReturnHandler) The problem here is that it mixes the two main ways of dealing with async computation: 1. Callback handlers [1]. 2. Promises (~ CompletableFuture) [2]. Normally, you either use one or the other, but here both are in use because the method returns a CompletableFuture (e.g. like a JS/Scala promise), and then is taking a callback handler as well. If you go down the path of promises, the normal thing would be: CompletableFuture forkInvocation(VisitableCommand newCommand) And then you chain (e.g. thenCompose or similar) the return function when the fork has completed. I assume that going down this route causes unnecessary allocations? If we're worried about allocations, I wonder whether a pure handler based approach might work better? It might not be as user-friendly but if we want to avoid CompletableFuture issues internally, then maybe that's the way? e.g. void forkInvocation(VisitableCommand newCommand, AsyncInterceptor.ForkReturnHandler forkReturnHandler); While at Summit/DevNation I had a chat with Clement from Vert.x team who had some reservations about CompletableFutures themselves. I don't remember the details right now (that's what vacation does to you!) but I've pinged him to find out more. In general though, there are multiple issues associated with the handler approach, including: * Lack of central error handling logic. * Callback readibility, when multiple handlers are specified in one go [3]. Cheers, [1] http://www.servicedesignpatterns.com/WebServiceInfrastructures/AsyncResponseHandler [2] http://exploringjs.com/es6/ch_promises.html [3] http://callbackhell.com -- Galder Zamarre?o Infinispan, Red Hat > On 22 Jun 2016, at 17:52, Radim Vansa wrote: > > Yes [1]. The longest chaining of operations I had in [2], basically > during ST I have to load a value locally*, perform a unicast/broadcast > to read different value and then execute the original one. > > * I shouldn't load it just from DC, as it could be in cache store, too; > though without persistence (which I don't deal with properly in > scattered cache yet) it would be more efficient to do the DC lookup > directly. > > Radim > > [1] https://github.com/rvansa/infinispan/tree/ISPN-6645 > [2] > https://github.com/rvansa/infinispan/blob/ISPN-6645/core/src/main/java/org/infinispan/interceptors/impl/PrefetchInvalidationInterceptor.java > > On 06/17/2016 10:52 AM, Galder Zamarre?o wrote: >> Radim, do you have a branch where you have been trying these things out? I'd like to play with what you're trying to do. >> >> Cheers, >> -- >> Galder Zamarre?o >> Infinispan, Red Hat >> >>> On 8 Jun 2016, at 14:23, Radim Vansa wrote: >>> >>> Hi, >>> >>> I would like to encourage you to play with the (relatively) new API for >>> sequential interceptors, and voice your comments - especially you corish >>> devs, and Galder who has much experience with async invocations and that >>> kind of stuff from JS-world. >>> >>> I am now trying to use the asynchronous methods only (the >>> forkInvocationSync() is only temporary helper!); Dan has made it this >>> way as he wanted to avoid unnecessary allocations, and I welcome this >>> GC-awareness, but regrettably I find it rather hard to use, due to its >>> handler-style nature. For the simplest style interceptors (do this, >>> invoke next interceptor, and process result) it's fine, but when you >>> want to do something like: >>> >>> visitFoo(cmd) { >>> Object x = null; >>> if (/* ... */) { >>> x = invoke(new OtherCommand()); >>> } >>> invoke(new DifferentCommand(x)); >>> Object retval = invoke(cmd); >>> return wrap(retval); >>> } >>> >>> I find myself passing handlers deep down. There is allocation cost for >>> closures, so API that does not allocate CompletableFutures does not pay off. >>> >>> I don't say that I could improve it (I have directed my comments to Dan >>> on IRC when I had something in particular), I just say that this is very >>> important API for further Infinispan development and everyone should pay >>> attention before it gets final. >>> >>> So please, play with it, and show your opinion. >>> >>> Radim >>> >>> -- >>> Radim Vansa >>> JBoss Performance Team >>> >>> _______________________________________________ >>> infinispan-dev mailing list >>> infinispan-dev at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/infinispan-dev >> >> _______________________________________________ >> infinispan-dev mailing list >> infinispan-dev at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/infinispan-dev > > > -- > Radim Vansa > JBoss Performance Team > > _______________________________________________ > infinispan-dev mailing list > infinispan-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/infinispan-dev From rvansa at redhat.com Wed Aug 3 06:49:16 2016 From: rvansa at redhat.com (Radim Vansa) Date: Wed, 3 Aug 2016 12:49:16 +0200 Subject: [infinispan-dev] Sequential interceptors API In-Reply-To: <79B0BF43-E05B-44CF-BC9C-2E534B55C5BB@redhat.com> References: <57580E54.10703@redhat.com> <8BD560BF-0F3E-4CC8-843C-EB54F5410877@redhat.com> <576AB428.10203@redhat.com> <79B0BF43-E05B-44CF-BC9C-2E534B55C5BB@redhat.com> Message-ID: <57A1CC2C.2010501@redhat.com> I think that Dan had another branch with more FSM-like API, but I can't find it :-/ R. On 08/03/2016 11:57 AM, Galder Zamarre?o wrote: > Hey Radim, > > Sorry for the delay having a look at this (Summit/DevNation then vacation). > > I agree with you that the way you're passing down the handler down the stack and accross lambdas is a bit counter-productive, because it means the lambda has to capture the handler, which in turn means that each lambda execution will result in a lambda instantiation. > > Looking at AsyncInvocationContext, methods like this feel a bit of an anti-pattern: > > CompletableFuture forkInvocation(VisitableCommand newCommand, AsyncInterceptor.ForkReturnHandler forkReturnHandler) > > The problem here is that it mixes the two main ways of dealing with async computation: > > 1. Callback handlers [1]. > 2. Promises (~ CompletableFuture) [2]. > > Normally, you either use one or the other, but here both are in use because the method returns a CompletableFuture (e.g. like a JS/Scala promise), and then is taking a callback handler as well. > > If you go down the path of promises, the normal thing would be: > > CompletableFuture forkInvocation(VisitableCommand newCommand) > > And then you chain (e.g. thenCompose or similar) the return function when the fork has completed. I assume that going down this route causes unnecessary allocations? > > If we're worried about allocations, I wonder whether a pure handler based approach might work better? It might not be as user-friendly but if we want to avoid CompletableFuture issues internally, then maybe that's the way? e.g. > > void forkInvocation(VisitableCommand newCommand, AsyncInterceptor.ForkReturnHandler forkReturnHandler); > > While at Summit/DevNation I had a chat with Clement from Vert.x team who had some reservations about CompletableFutures themselves. I don't remember the details right now (that's what vacation does to you!) but I've pinged him to find out more. > > In general though, there are multiple issues associated with the handler approach, including: > > * Lack of central error handling logic. > * Callback readibility, when multiple handlers are specified in one go [3]. > > Cheers, > > [1] http://www.servicedesignpatterns.com/WebServiceInfrastructures/AsyncResponseHandler > [2] http://exploringjs.com/es6/ch_promises.html > [3] http://callbackhell.com > -- > Galder Zamarre?o > Infinispan, Red Hat > >> On 22 Jun 2016, at 17:52, Radim Vansa wrote: >> >> Yes [1]. The longest chaining of operations I had in [2], basically >> during ST I have to load a value locally*, perform a unicast/broadcast >> to read different value and then execute the original one. >> >> * I shouldn't load it just from DC, as it could be in cache store, too; >> though without persistence (which I don't deal with properly in >> scattered cache yet) it would be more efficient to do the DC lookup >> directly. >> >> Radim >> >> [1] https://github.com/rvansa/infinispan/tree/ISPN-6645 >> [2] >> https://github.com/rvansa/infinispan/blob/ISPN-6645/core/src/main/java/org/infinispan/interceptors/impl/PrefetchInvalidationInterceptor.java >> >> On 06/17/2016 10:52 AM, Galder Zamarre?o wrote: >>> Radim, do you have a branch where you have been trying these things out? I'd like to play with what you're trying to do. >>> >>> Cheers, >>> -- >>> Galder Zamarre?o >>> Infinispan, Red Hat >>> >>>> On 8 Jun 2016, at 14:23, Radim Vansa wrote: >>>> >>>> Hi, >>>> >>>> I would like to encourage you to play with the (relatively) new API for >>>> sequential interceptors, and voice your comments - especially you corish >>>> devs, and Galder who has much experience with async invocations and that >>>> kind of stuff from JS-world. >>>> >>>> I am now trying to use the asynchronous methods only (the >>>> forkInvocationSync() is only temporary helper!); Dan has made it this >>>> way as he wanted to avoid unnecessary allocations, and I welcome this >>>> GC-awareness, but regrettably I find it rather hard to use, due to its >>>> handler-style nature. For the simplest style interceptors (do this, >>>> invoke next interceptor, and process result) it's fine, but when you >>>> want to do something like: >>>> >>>> visitFoo(cmd) { >>>> Object x = null; >>>> if (/* ... */) { >>>> x = invoke(new OtherCommand()); >>>> } >>>> invoke(new DifferentCommand(x)); >>>> Object retval = invoke(cmd); >>>> return wrap(retval); >>>> } >>>> >>>> I find myself passing handlers deep down. There is allocation cost for >>>> closures, so API that does not allocate CompletableFutures does not pay off. >>>> >>>> I don't say that I could improve it (I have directed my comments to Dan >>>> on IRC when I had something in particular), I just say that this is very >>>> important API for further Infinispan development and everyone should pay >>>> attention before it gets final. >>>> >>>> So please, play with it, and show your opinion. >>>> >>>> Radim >>>> >>>> -- >>>> Radim Vansa >>>> JBoss Performance Team >>>> >>>> _______________________________________________ >>>> infinispan-dev mailing list >>>> infinispan-dev at lists.jboss.org >>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev >>> _______________________________________________ >>> infinispan-dev mailing list >>> infinispan-dev at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/infinispan-dev >> >> -- >> Radim Vansa >> JBoss Performance Team >> >> _______________________________________________ >> infinispan-dev mailing list >> infinispan-dev at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/infinispan-dev > > _______________________________________________ > infinispan-dev mailing list > infinispan-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/infinispan-dev -- Radim Vansa JBoss Performance Team From dan.berindei at gmail.com Wed Aug 3 07:54:41 2016 From: dan.berindei at gmail.com (Dan Berindei) Date: Wed, 3 Aug 2016 14:54:41 +0300 Subject: [infinispan-dev] Sequential interceptors API In-Reply-To: <57A1CC2C.2010501@redhat.com> References: <57580E54.10703@redhat.com> <8BD560BF-0F3E-4CC8-843C-EB54F5410877@redhat.com> <576AB428.10203@redhat.com> <79B0BF43-E05B-44CF-BC9C-2E534B55C5BB@redhat.com> <57A1CC2C.2010501@redhat.com> Message-ID: Yeah, I just fixed (almost all of) the test failures this morning and I pushed it here: https://github.com/infinispan/infinispan/compare/master...danberindei:ISPN-5467_CompletableFuture-like_API?expand=1 Galder, I'm not sure I understand the part about mixing promises and callbacks... almost all CompletableFuture methods take a callback parameter, so I'm not sure how one could avoid mixing them. That being said, the API as it is in master now tends to encourage nesting of callbacks, and that's what I'm trying to change. My new approach has a promise-like interface called IntermediateInvocationStage (for now), which works like a promise on the interceptors not yet executed. It has various methods you can then use to add callbacks to be executed after those interceptors (and any callbacks they installed). To get an IntermediateInvocationStage, you need to call a method like invokeNext(ctx, command) on BaseAsyncInterceptor/InterceptorStage. I'm not yet sure whether exposing InterceptorStage to the interceptor is really necessary. Both the interceptor and the callbacks then return an InvocationStage, which is implemented by the same classes that implement IntermediateInvocationStage, but doesn't allow adding more callbacks. This is mainly so that I can have returnWith(returnValue) instead of returnWith(ctx, command, returnValue). For the actual asynchronous work, I have 2 goAsync methods in InterceptorStage, because I think having an explicit callback can be slightly more efficient - I'm not 100% sure about this either. I used to have a waitFor(CompletionStage) method that returned an InterceptorStage, but I decided it was too confusing to have InterceptorStage behave like a promise as well. IntermediateInvocationStage also allows "asynchronous" callbacks with composeAsync, but it seems a bit weird to have a single callback handle both on an InvocationStage and on a CompletionStage. So I'm thinking of removing that, and forcing the interceptors to use compose+goAsync instead. That probably means callback nesting again, so I need to check how it would affect the L1 interceptors. About performance: I only tested non-tx local reads so far, but in that case I'm only getting one real allocation in CallInterceptor, which gets reused by all the other interceptors. For this scenario all the callbacks are cached in the interceptor fields, of course, so it's not HotSpot doing scalar replacement for the callbacks - although in theory that should work as well. I need to do a lot more testing on this... Cheers Dan On Wed, Aug 3, 2016 at 1:49 PM, Radim Vansa wrote: > I think that Dan had another branch with more FSM-like API, but I can't > find it :-/ > > R. > > On 08/03/2016 11:57 AM, Galder Zamarre?o wrote: >> Hey Radim, >> >> Sorry for the delay having a look at this (Summit/DevNation then vacation). >> >> I agree with you that the way you're passing down the handler down the stack and accross lambdas is a bit counter-productive, because it means the lambda has to capture the handler, which in turn means that each lambda execution will result in a lambda instantiation. >> >> Looking at AsyncInvocationContext, methods like this feel a bit of an anti-pattern: >> >> CompletableFuture forkInvocation(VisitableCommand newCommand, AsyncInterceptor.ForkReturnHandler forkReturnHandler) >> >> The problem here is that it mixes the two main ways of dealing with async computation: >> >> 1. Callback handlers [1]. >> 2. Promises (~ CompletableFuture) [2]. >> >> Normally, you either use one or the other, but here both are in use because the method returns a CompletableFuture (e.g. like a JS/Scala promise), and then is taking a callback handler as well. >> >> If you go down the path of promises, the normal thing would be: >> >> CompletableFuture forkInvocation(VisitableCommand newCommand) >> >> And then you chain (e.g. thenCompose or similar) the return function when the fork has completed. I assume that going down this route causes unnecessary allocations? >> >> If we're worried about allocations, I wonder whether a pure handler based approach might work better? It might not be as user-friendly but if we want to avoid CompletableFuture issues internally, then maybe that's the way? e.g. >> >> void forkInvocation(VisitableCommand newCommand, AsyncInterceptor.ForkReturnHandler forkReturnHandler); >> >> While at Summit/DevNation I had a chat with Clement from Vert.x team who had some reservations about CompletableFutures themselves. I don't remember the details right now (that's what vacation does to you!) but I've pinged him to find out more. >> >> In general though, there are multiple issues associated with the handler approach, including: >> >> * Lack of central error handling logic. >> * Callback readibility, when multiple handlers are specified in one go [3]. >> >> Cheers, >> >> [1] http://www.servicedesignpatterns.com/WebServiceInfrastructures/AsyncResponseHandler >> [2] http://exploringjs.com/es6/ch_promises.html >> [3] http://callbackhell.com >> -- >> Galder Zamarre?o >> Infinispan, Red Hat >> >>> On 22 Jun 2016, at 17:52, Radim Vansa wrote: >>> >>> Yes [1]. The longest chaining of operations I had in [2], basically >>> during ST I have to load a value locally*, perform a unicast/broadcast >>> to read different value and then execute the original one. >>> >>> * I shouldn't load it just from DC, as it could be in cache store, too; >>> though without persistence (which I don't deal with properly in >>> scattered cache yet) it would be more efficient to do the DC lookup >>> directly. >>> >>> Radim >>> >>> [1] https://github.com/rvansa/infinispan/tree/ISPN-6645 >>> [2] >>> https://github.com/rvansa/infinispan/blob/ISPN-6645/core/src/main/java/org/infinispan/interceptors/impl/PrefetchInvalidationInterceptor.java >>> >>> On 06/17/2016 10:52 AM, Galder Zamarre?o wrote: >>>> Radim, do you have a branch where you have been trying these things out? I'd like to play with what you're trying to do. >>>> >>>> Cheers, >>>> -- >>>> Galder Zamarre?o >>>> Infinispan, Red Hat >>>> >>>>> On 8 Jun 2016, at 14:23, Radim Vansa wrote: >>>>> >>>>> Hi, >>>>> >>>>> I would like to encourage you to play with the (relatively) new API for >>>>> sequential interceptors, and voice your comments - especially you corish >>>>> devs, and Galder who has much experience with async invocations and that >>>>> kind of stuff from JS-world. >>>>> >>>>> I am now trying to use the asynchronous methods only (the >>>>> forkInvocationSync() is only temporary helper!); Dan has made it this >>>>> way as he wanted to avoid unnecessary allocations, and I welcome this >>>>> GC-awareness, but regrettably I find it rather hard to use, due to its >>>>> handler-style nature. For the simplest style interceptors (do this, >>>>> invoke next interceptor, and process result) it's fine, but when you >>>>> want to do something like: >>>>> >>>>> visitFoo(cmd) { >>>>> Object x = null; >>>>> if (/* ... */) { >>>>> x = invoke(new OtherCommand()); >>>>> } >>>>> invoke(new DifferentCommand(x)); >>>>> Object retval = invoke(cmd); >>>>> return wrap(retval); >>>>> } >>>>> >>>>> I find myself passing handlers deep down. There is allocation cost for >>>>> closures, so API that does not allocate CompletableFutures does not pay off. >>>>> >>>>> I don't say that I could improve it (I have directed my comments to Dan >>>>> on IRC when I had something in particular), I just say that this is very >>>>> important API for further Infinispan development and everyone should pay >>>>> attention before it gets final. >>>>> >>>>> So please, play with it, and show your opinion. >>>>> >>>>> Radim >>>>> >>>>> -- >>>>> Radim Vansa >>>>> JBoss Performance Team >>>>> >>>>> _______________________________________________ >>>>> infinispan-dev mailing list >>>>> infinispan-dev at lists.jboss.org >>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev >>>> _______________________________________________ >>>> infinispan-dev mailing list >>>> infinispan-dev at lists.jboss.org >>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev >>> >>> -- >>> Radim Vansa >>> JBoss Performance Team >>> >>> _______________________________________________ >>> infinispan-dev mailing list >>> infinispan-dev at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/infinispan-dev >> >> _______________________________________________ >> infinispan-dev mailing list >> infinispan-dev at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/infinispan-dev > > > -- > Radim Vansa > JBoss Performance Team > > _______________________________________________ > infinispan-dev mailing list > infinispan-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/infinispan-dev From mudokonman at gmail.com Wed Aug 3 08:50:58 2016 From: mudokonman at gmail.com (William Burns) Date: Wed, 03 Aug 2016 12:50:58 +0000 Subject: [infinispan-dev] Compatiibility 2.0 dump In-Reply-To: <1DA0CA01-4903-4A7B-AC75-EBBC80A0FA63@redhat.com> References: <5768F177.9060307@redhat.com> <576AB255.7060202@redhat.com> <1DA0CA01-4903-4A7B-AC75-EBBC80A0FA63@redhat.com> Message-ID: On Mon, Jul 25, 2016 at 10:03 AM Galder Zamarre?o wrote: > > > On 22 Jun 2016, at 17:44, Radim Vansa wrote: > > > > I've spotted things like 'decorating cache' in the wiki page. I though > > that the core architecture in Infinispan, modifying the behavior > > according to configurations, is the interceptor stack. While we have > > some doubts about its performance, and there are limitations - e.g. the > > Flags don't allow to add custom parameters and we certainly don't want > > to add Flag.JSON and Flag.XML - I would consider decorating a Cache > V> vs. adding interceptors. > > > > I am thinking of adding the transcoder information to invocation context > > and only pass different ICF to the CacheImpl. Though, this requires new > > factory, new interceptor and a handful of specialized context classes > > (or a wrapper to the existing ones). Whoo, just decorating Cache sounds > > much simpler (and probably more performant). Or should we have forks in > > interceptor stack? (as an alternative to different wrappers). > > > > The idea of interceptors is that these are common for all operations, if > > we want to do things differently for different endpoints (incl. > > embedded), decorating probably is the answer. > > > > My 2c (or rather just random thoughts and whining) > > Will and I had a good discussion on the problems that interceptors had > with data conversion layers while at Summit/DevNation. I don't remember the > details very well, that's what 3 weeks of holiday does to you ;), but Will > will reply with some more details. From what I remember, doing conversion > in interceptors made did not fully work with streams and custom filters. > Sorry for the delay. The issue from what I remember is mostly what you said Galder. Streams in particular are interesting because you may have a Stream but underneath it is really a Stream so if you try to pass an intermediate operation such as filter or map, you would pass a Predicate but that can't be applied to the underlying stream without first unboxing the key/value but then the value returned from the stream may not know if the value is unboxed or not. It is just quite messy. I don't even remember how this works when protobuf is also in the mix :( Filters are somewhat similar but they are mostly okay because they only apply at most 1 filter/map method and then use an iterator where as a stream could be any number. > > Cheers, > > > > > Radim > > > > On 06/21/2016 09:49 AM, Tristan Tarrant wrote: > >> Hi all, > >> > >> I've created a wiki [1] for the "compatibility 2.0" ideas we talked > >> about recently at the query meeting. > >> > >> This is mostly a dump of the minutes, so the form is not complete, but > >> initial comments are welcome. > >> > >> > >> Tristan > >> > >> [1] https://github.com/infinispan/infinispan/wiki/Compatibility-2.0 > > > > > > -- > > Radim Vansa > > JBoss Performance Team > > > > _______________________________________________ > > infinispan-dev mailing list > > infinispan-dev at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/infinispan-dev > > > _______________________________________________ > infinispan-dev mailing list > infinispan-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/infinispan-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20160803/9cf68986/attachment-0001.html From galder at redhat.com Thu Aug 4 03:03:10 2016 From: galder at redhat.com (=?utf-8?Q?Galder_Zamarre=C3=B1o?=) Date: Thu, 4 Aug 2016 09:03:10 +0200 Subject: [infinispan-dev] Sequential interceptors API In-Reply-To: References: <57580E54.10703@redhat.com> <8BD560BF-0F3E-4CC8-843C-EB54F5410877@redhat.com> <576AB428.10203@redhat.com> <79B0BF43-E05B-44CF-BC9C-2E534B55C5BB@redhat.com> <57A1CC2C.2010501@redhat.com> Message-ID: -- Galder Zamarre?o Infinispan, Red Hat > On 3 Aug 2016, at 13:54, Dan Berindei wrote: > > Yeah, I just fixed (almost all of) the test failures this morning and > I pushed it here: > > https://github.com/infinispan/infinispan/compare/master...danberindei:ISPN-5467_CompletableFuture-like_API?expand=1 > > > Galder, I'm not sure I understand the part about mixing promises and > callbacks... almost all CompletableFuture methods take a callback > parameter, so I'm not sure how one could avoid mixing them. The question how these callbacks are passed: When using Promises or CompletableFutures, the callbacks are passed to the promise/CF via its fluent API, e.g: CompletableFuture cf = methodA(); cf.thenCompose().thenCombine().handle().whenComplete()... // Might not be realistic, just showing fluency in action In your case, the forkHandler is passed in as parameter to methodA() instead of it being a continuation that you add to the CompletableFuture via its fluent API. Passing handlers as parameters to a method you created (and not as parameters to a continuation of CompletableFuture) is the old asynchronous call handling method that Node.js made so famous. The current API mixes both, by passing some callbacks to CompletableFuture methods and then some being passed around as method parameters, which makes it ackward. So, instead of: CompletableFuture forkInvocation(VisitableCommand newCommand, AsyncInterceptor.ForkReturnHandler forkReturnHandler) I'd expect: CompletableFuture forkInvocation(VisitableCommand newCommand); And use it like this: CompletableFuture cf = forkInvocation(cmd); cf.whenComplete(forkReturnHandler); // So, what is forkReturnHandler? forkReturnHandler would be a BiConsumer. Now, what is Z? Z is everything that the handler needs to deal with, except Throwable, which gets passed as 2nd element to the BiConsumer. So Z would a wrapper around InvocationContext, VisitableCommand and Object (return value). > That being > said, the API as it is in master now tends to encourage nesting of > callbacks, and that's what I'm trying to change. > > My new approach has a promise-like interface called > IntermediateInvocationStage (for now), which works like a promise on > the interceptors not yet executed. It has various methods you can then > use to add callbacks to be executed after those interceptors (and any > callbacks they installed). > > To get an IntermediateInvocationStage, you need to call a method like > invokeNext(ctx, command) on BaseAsyncInterceptor/InterceptorStage. I'm > not yet sure whether exposing InterceptorStage to the interceptor is > really necessary. > > Both the interceptor and the callbacks then return an InvocationStage, > which is implemented by the same classes that implement > IntermediateInvocationStage, but doesn't allow adding more callbacks. > This is mainly so that I can have returnWith(returnValue) instead of > returnWith(ctx, command, returnValue). > > For the actual asynchronous work, I have 2 goAsync methods in > InterceptorStage, because I think having an explicit callback can be > slightly more efficient - I'm not 100% sure about this either. I used > to have a waitFor(CompletionStage) method that returned an > InterceptorStage, but I decided it was too confusing to have > InterceptorStage behave like a promise as well. > > IntermediateInvocationStage also allows "asynchronous" callbacks with > composeAsync, but it seems a bit weird to have a single callback > handle both on an InvocationStage and on a CompletionStage. So I'm > thinking of removing that, and forcing the interceptors to use > compose+goAsync instead. That probably means callback nesting again, > so I need to check how it would affect the L1 interceptors. > > About performance: I only tested non-tx local reads so far, but in > that case I'm only getting one real allocation in CallInterceptor, > which gets reused by all the other interceptors. For this scenario all > the callbacks are cached in the interceptor fields, of course, so it's > not HotSpot doing scalar replacement for the callbacks - although in > theory that should work as well. I need to do a lot more testing on > this... > > > Cheers > Dan > > > > On Wed, Aug 3, 2016 at 1:49 PM, Radim Vansa wrote: >> I think that Dan had another branch with more FSM-like API, but I can't >> find it :-/ >> >> R. >> >> On 08/03/2016 11:57 AM, Galder Zamarre?o wrote: >>> Hey Radim, >>> >>> Sorry for the delay having a look at this (Summit/DevNation then vacation). >>> >>> I agree with you that the way you're passing down the handler down the stack and accross lambdas is a bit counter-productive, because it means the lambda has to capture the handler, which in turn means that each lambda execution will result in a lambda instantiation. >>> >>> Looking at AsyncInvocationContext, methods like this feel a bit of an anti-pattern: >>> >>> CompletableFuture forkInvocation(VisitableCommand newCommand, AsyncInterceptor.ForkReturnHandler forkReturnHandler) >>> >>> The problem here is that it mixes the two main ways of dealing with async computation: >>> >>> 1. Callback handlers [1]. >>> 2. Promises (~ CompletableFuture) [2]. >>> >>> Normally, you either use one or the other, but here both are in use because the method returns a CompletableFuture (e.g. like a JS/Scala promise), and then is taking a callback handler as well. >>> >>> If you go down the path of promises, the normal thing would be: >>> >>> CompletableFuture forkInvocation(VisitableCommand newCommand) >>> >>> And then you chain (e.g. thenCompose or similar) the return function when the fork has completed. I assume that going down this route causes unnecessary allocations? >>> >>> If we're worried about allocations, I wonder whether a pure handler based approach might work better? It might not be as user-friendly but if we want to avoid CompletableFuture issues internally, then maybe that's the way? e.g. >>> >>> void forkInvocation(VisitableCommand newCommand, AsyncInterceptor.ForkReturnHandler forkReturnHandler); >>> >>> While at Summit/DevNation I had a chat with Clement from Vert.x team who had some reservations about CompletableFutures themselves. I don't remember the details right now (that's what vacation does to you!) but I've pinged him to find out more. >>> >>> In general though, there are multiple issues associated with the handler approach, including: >>> >>> * Lack of central error handling logic. >>> * Callback readibility, when multiple handlers are specified in one go [3]. >>> >>> Cheers, >>> >>> [1] http://www.servicedesignpatterns.com/WebServiceInfrastructures/AsyncResponseHandler >>> [2] http://exploringjs.com/es6/ch_promises.html >>> [3] http://callbackhell.com >>> -- >>> Galder Zamarre?o >>> Infinispan, Red Hat >>> >>>> On 22 Jun 2016, at 17:52, Radim Vansa wrote: >>>> >>>> Yes [1]. The longest chaining of operations I had in [2], basically >>>> during ST I have to load a value locally*, perform a unicast/broadcast >>>> to read different value and then execute the original one. >>>> >>>> * I shouldn't load it just from DC, as it could be in cache store, too; >>>> though without persistence (which I don't deal with properly in >>>> scattered cache yet) it would be more efficient to do the DC lookup >>>> directly. >>>> >>>> Radim >>>> >>>> [1] https://github.com/rvansa/infinispan/tree/ISPN-6645 >>>> [2] >>>> https://github.com/rvansa/infinispan/blob/ISPN-6645/core/src/main/java/org/infinispan/interceptors/impl/PrefetchInvalidationInterceptor.java >>>> >>>> On 06/17/2016 10:52 AM, Galder Zamarre?o wrote: >>>>> Radim, do you have a branch where you have been trying these things out? I'd like to play with what you're trying to do. >>>>> >>>>> Cheers, >>>>> -- >>>>> Galder Zamarre?o >>>>> Infinispan, Red Hat >>>>> >>>>>> On 8 Jun 2016, at 14:23, Radim Vansa wrote: >>>>>> >>>>>> Hi, >>>>>> >>>>>> I would like to encourage you to play with the (relatively) new API for >>>>>> sequential interceptors, and voice your comments - especially you corish >>>>>> devs, and Galder who has much experience with async invocations and that >>>>>> kind of stuff from JS-world. >>>>>> >>>>>> I am now trying to use the asynchronous methods only (the >>>>>> forkInvocationSync() is only temporary helper!); Dan has made it this >>>>>> way as he wanted to avoid unnecessary allocations, and I welcome this >>>>>> GC-awareness, but regrettably I find it rather hard to use, due to its >>>>>> handler-style nature. For the simplest style interceptors (do this, >>>>>> invoke next interceptor, and process result) it's fine, but when you >>>>>> want to do something like: >>>>>> >>>>>> visitFoo(cmd) { >>>>>> Object x = null; >>>>>> if (/* ... */) { >>>>>> x = invoke(new OtherCommand()); >>>>>> } >>>>>> invoke(new DifferentCommand(x)); >>>>>> Object retval = invoke(cmd); >>>>>> return wrap(retval); >>>>>> } >>>>>> >>>>>> I find myself passing handlers deep down. There is allocation cost for >>>>>> closures, so API that does not allocate CompletableFutures does not pay off. >>>>>> >>>>>> I don't say that I could improve it (I have directed my comments to Dan >>>>>> on IRC when I had something in particular), I just say that this is very >>>>>> important API for further Infinispan development and everyone should pay >>>>>> attention before it gets final. >>>>>> >>>>>> So please, play with it, and show your opinion. >>>>>> >>>>>> Radim >>>>>> >>>>>> -- >>>>>> Radim Vansa >>>>>> JBoss Performance Team >>>>>> >>>>>> _______________________________________________ >>>>>> infinispan-dev mailing list >>>>>> infinispan-dev at lists.jboss.org >>>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev >>>>> _______________________________________________ >>>>> infinispan-dev mailing list >>>>> infinispan-dev at lists.jboss.org >>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev >>>> >>>> -- >>>> Radim Vansa >>>> JBoss Performance Team >>>> >>>> _______________________________________________ >>>> infinispan-dev mailing list >>>> infinispan-dev at lists.jboss.org >>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev >>> >>> _______________________________________________ >>> infinispan-dev mailing list >>> infinispan-dev at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/infinispan-dev >> >> >> -- >> Radim Vansa >> JBoss Performance Team >> >> _______________________________________________ >> infinispan-dev mailing list >> infinispan-dev at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/infinispan-dev > > _______________________________________________ > infinispan-dev mailing list > infinispan-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/infinispan-dev From slaskawi at redhat.com Fri Aug 5 09:30:42 2016 From: slaskawi at redhat.com (Sebastian Laskawiec) Date: Fri, 5 Aug 2016 15:30:42 +0200 Subject: [infinispan-dev] Status 2015-08-05 Message-ID: Hey! Unfortunately I won't be able to join you during the status meeting on Monday, so here's what managed to do last week: - I mainly worked on HelthChack API: - https://issues.jboss.org/browse/ISPN-6679 - https://github.com/slaskawi/infinispan/tree/ISPN-6679/Healthcheck_api - Interfaces and JMX are done, the only missing bit is the Wildfly integrations (currently implemented as metrics) - Tomaz Cerar mentioned there is no way to use Custom Handlers for Management API (we can not implement gathering statistics with a custom URL like http://localhost:9990/health). We can use HTTP GET for obtaining resources or POST for operations and runtime resources. - I need to think it over and choose one of the solutions (using metrics seem to be the worst approach) - I talked with James about printing out last X lines of log - again it's not an easy task and James suggested that it can be using the logging subsystem. I will look into that too. - I fixed a couple of Windows errors for the product (they were ok in the upstream). - I started implementing a CI job for our Docker images and OpenShift - I also prepared a blog post about Infinispan and OpenShift (it will be released next week). - There are also some good news from my home city - we're opening Bydgoszcz JUG (I'd love to see you guys pronouncing "Bydgoszcz" :D) in September/October and I reserved 2 talks about Open Source (maintaining, contributing etc) and Infinispan+OpenShift/Kubernetes. Wish me luck! Thanks Sebastian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20160805/5489ed4d/attachment.html From rory.odonnell at oracle.com Mon Aug 8 04:22:58 2016 From: rory.odonnell at oracle.com (Rory O'Donnell) Date: Mon, 8 Aug 2016 09:22:58 +0100 Subject: [infinispan-dev] Early Access builds of JDK 8u112 b04, JDK 9 b130 are available on java.net Message-ID: Hi Galder, Early Access b130 for JDK 9 is available on java.net, summary of changes are listed here . Early Access b129 (#5332) for JDK 9 with Project Jigsaw is available on java.net, summary of changes are listed here Early Access b04 for JDK 8u112 is available on java.net, summary of changes are listed here Rgds,Rory -- Rgds,Rory O'Donnell Quality Engineering Manager Oracle EMEA , Dublin, Ireland -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20160808/f39fb254/attachment.html From sanne at infinispan.org Mon Aug 8 08:09:21 2016 From: sanne at infinispan.org (Sanne Grinovero) Date: Mon, 8 Aug 2016 13:09:21 +0100 Subject: [infinispan-dev] jdk8backported package In-Reply-To: References: <56976B94.9010704@redhat.com> Message-ID: Hi, sorry for reviving this old thread, but this came up again in the form of doubts and design questions this morning from people in the performance team profiling it. Let's please change the name, I've opened a JIRA to not forget again: - https://issues.jboss.org/browse/ISPN-6933 Will, assigned to you as I assume it would take you 2 minutes :) Thanks, Sanne On 25 January 2016 at 20:18, William Burns wrote: > > > On Mon, Jan 25, 2016 at 10:09 AM Sebastian Laskawiec > wrote: >> >> Would it be possible to decouple Map implementation from our custom code >> (like eviction policy or setting max size)? Or the dependency between those >> two is too strong? > > > This is possible. I had already thought of doing that at some point, but > haven't been able to look into it or have a great reason yet (we lose some > stuff like better size estimations - since we have access to the underlying > array). > > Unfortunately the equivalent versions have to stay even if we remove the > eviction stuff, since there is no pluggable way to do this with the JVM > classes. > >> >> >> On Mon, Jan 25, 2016 at 3:15 PM, William Burns >> wrote: >>> >>> Unfortunately this isn't really possible to remove these classes. They >>> have additional changes over and above the jdk8 classes. We could move it >>> into a different package though if we wanted to. >>> >>> To be honest the only reason this is still really needed is for the >>> BoundedConcurrentHashMapV8. I have been talking with Dan on and off for a >>> while about even possibly looking into using a different map implementation >>> (such as caffeine or something else equivalent). We haven't looked into it >>> very seriously though. >>> >>> We could look into this more if people think we want to tackle that. >>> >>> - Will >>> >>> On Thu, Jan 14, 2016 at 4:34 AM Radim Vansa wrote: >>>> >>>> Hi, >>>> >>>> although we're on Java 8, there's still the package >>>> org.infinispan.*.jdk8backported in our codebase. Is there any plan (and >>>> possibility) to remove these and use implementation provided by runtime? >>>> Or have we tweaked them too much, so shall we rather rename them? >>>> >>>> Radim >>>> >>>> -- >>>> Radim Vansa >>>> JBoss Performance Team >>>> >>>> _______________________________________________ >>>> infinispan-dev mailing list >>>> infinispan-dev at lists.jboss.org >>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev >>> >>> >>> _______________________________________________ >>> infinispan-dev mailing list >>> infinispan-dev at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/infinispan-dev >> >> >> _______________________________________________ >> infinispan-dev mailing list >> infinispan-dev at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/infinispan-dev > > > _______________________________________________ > infinispan-dev mailing list > infinispan-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/infinispan-dev From galder at redhat.com Tue Aug 9 08:15:01 2016 From: galder at redhat.com (=?utf-8?Q?Galder_Zamarre=C3=B1o?=) Date: Tue, 9 Aug 2016 14:15:01 +0200 Subject: [infinispan-dev] Weekly IRC meeting - 15th August 2016 Message-ID: Hi all, Please find below the summary of the weekly IRC meeting we had yesterday: http://transcripts.jboss.org/meeting/irc.freenode.org/infinispan/2016/infinispan.2016-01-04-15.08.html Cheers, -- Galder Zamarre?o Infinispan, Red Hat From ttarrant at redhat.com Tue Aug 9 10:51:33 2016 From: ttarrant at redhat.com (Tristan Tarrant) Date: Tue, 9 Aug 2016 16:51:33 +0200 Subject: [infinispan-dev] Weekly IRC meeting - 15th August 2016 In-Reply-To: References: Message-ID: <79be37cc-cbd6-0003-6fa6-6c477432f299@infinispan.org> Galder, I believe you really wanted to share this instead: http://transcripts.jboss.org/meeting/irc.freenode.org/infinispan/2016/infinispan.2016-08-08-13.58.log.html As for me, I've been doing the following: - releasing the MongoDB cachestore - removing some TODOs from the docs (ISPN-4735) - playing with the DynaLinker from Java 9 to find a solution for Nashorn clustered streams (ISPN-6173). The DynaLinker also exists in Java 8 but uses a non public API (although it should be possible to support it as well). - continuing work on refreshing the DZone RefCard for Infinispan This week I plan to continue the above as well as release an update to the Cloud Cache Store. Tristan On 09/08/16 14:15, Galder Zamarre?o wrote: > Hi all, > > Please find below the summary of the weekly IRC meeting we had yesterday: > http://transcripts.jboss.org/meeting/irc.freenode.org/infinispan/2016/infinispan.2016-01-04-15.08.html > > Cheers, > -- > Galder Zamarre?o > Infinispan, Red Hat > > > _______________________________________________ > infinispan-dev mailing list > infinispan-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/infinispan-dev From slaskawi at redhat.com Thu Aug 11 04:59:46 2016 From: slaskawi at redhat.com (Sebastian Laskawiec) Date: Thu, 11 Aug 2016 10:59:46 +0200 Subject: [infinispan-dev] Configuration management and Docker/Kubernetes/OpenShift Message-ID: Hey! I'm working on configuration management in cloud environment [1]. I put some finding in the ticket [1] but let me tell you more about the options I investigated: - Kubernetes/OpenShift ConfigMaps [2][3] - Those structures are specially designed to hold configuration data in any format (yaml, json, properties, xml, doesn't matter). - The configuration can be mounted into a pod as a directory (technically a volume). We can not mount it as a single file. Having said that we would need to either store cloud.xml file separately (standalone/cloud/configuration?) or ask users to build configuration from whole standalone/configuration directory. Both options are valid in my opinion. - OpenShift S2I [4] builder - S2I builder takes a git repository and a Docker image and combines those two together. - We could store a cloud.xml file inside a git repository and modify our infinispan Docker image to support S2I scripts (if cloud.xml is detected in a git repository - replace the default configuration). - Unfortunately it's OpenShift specific thing. - Extend the Infinispan Docker image - We could ask users to extend our Docker image and put their specific configuration there - The biggest advantage - it will work regardless to the environment (pure Docker, Kubernetes, OpenShift, doesn't matter) All options require restarting pods to update configuration (remember, pods were designed to be immutable). I think we should support 2 options - ConfigMaps for Kubernetes and OpenShift and extending our Docker image for all other use cases (because this option gives the most flexibility). What do you think? Thanks Sebastian [1] https://issues.jboss.org/browse/ISPN-6675 [2] http://kubernetes.io/docs/user-guide/configmap/ [3] https://docs.openshift.org/latest/dev_guide/configmaps.html [4] https://github.com/openshift/source-to-image -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20160811/cd1e3c13/attachment.html From gustavo at infinispan.org Thu Aug 11 05:17:14 2016 From: gustavo at infinispan.org (Gustavo Fernandes) Date: Thu, 11 Aug 2016 10:17:14 +0100 Subject: [infinispan-dev] Configuration management and Docker/Kubernetes/OpenShift In-Reply-To: References: Message-ID: On Thu, Aug 11, 2016 at 9:59 AM, Sebastian Laskawiec wrote: > Hey! > > I'm working on configuration management in cloud environment [1]. I put > some finding in the ticket [1] but let me tell you more about the options I > investigated: > > - Kubernetes/OpenShift ConfigMaps [2][3] > - Those structures are specially designed to hold configuration > data in any format (yaml, json, properties, xml, doesn't matter). > - The configuration can be mounted into a pod as a directory > (technically a volume). We can not mount it as a single file. Having said > that we would need to either store cloud.xml file separately > (standalone/cloud/configuration?) or ask users to build > configuration from whole standalone/configuration directory. Both options > are valid in my opinion. > - OpenShift S2I [4] builder > - S2I builder takes a git repository and a Docker image and > combines those two together. > - We could store a cloud.xml file inside a git repository and > modify our infinispan Docker image to support S2I scripts (if cloud.xml is > detected in a git repository - replace the default configuration). > - Unfortunately it's OpenShift specific thing. > - Extend the Infinispan Docker image > - We could ask users to extend our Docker image and put their > specific configuration there > - The biggest advantage - it will work regardless to the > environment (pure Docker, Kubernetes, OpenShift, doesn't matter) > > All options require restarting pods to update configuration (remember, > pods were designed to be immutable). > > I think we should support 2 options - ConfigMaps for Kubernetes and > OpenShift and extending our Docker image for all other use cases (because > this option gives the most flexibility). > > What do you think? > For static configuration use cases, I think they are all valid options, it's up to the user to pick the right one depending on the environment/use case. With relation to the S2I specifically, it could be really interesting for the cases when custom code (marshallers, filters, taks, etc) need to be deployed along Infinispan: the S2I machinery could build those jars, add custom configurations, combine with the jboss/infinispan-server and have it running on Openshift. When dynamic configuration changes need to be applied, I think [1] is best option. [1] https://issues.jboss.org/browse/ISPN-6000 Cheers, Gustavo > > Thanks > Sebastian > > [1] https://issues.jboss.org/browse/ISPN-6675 > [2] http://kubernetes.io/docs/user-guide/configmap/ > [3] https://docs.openshift.org/latest/dev_guide/configmaps.html > [4] https://github.com/openshift/source-to-image > > _______________________________________________ > infinispan-dev mailing list > infinispan-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/infinispan-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20160811/65affa0e/attachment.html From anistor at redhat.com Fri Aug 12 07:36:39 2016 From: anistor at redhat.com (Adrian Nistor) Date: Fri, 12 Aug 2016 14:36:39 +0300 Subject: [infinispan-dev] Release of Infinispan 8.2.4.Final Message-ID: Hi all, yesterday we made a new maintenance release: 8.2.4.Final. Read about it here: http://goo.gl/d1DqSQ Cheers! Adrian From sanne at infinispan.org Tue Aug 16 05:34:21 2016 From: sanne at infinispan.org (Sanne Grinovero) Date: Tue, 16 Aug 2016 10:34:21 +0100 Subject: [infinispan-dev] Hot Rod Multi-get with versions? Message-ID: Hi all, I'm having lots of fun learning to use the Hot Rod clients. One thing that is getting very clear to me is that getVersioned( k ) is much more useful than a regular get, as anything I'm doing turns out to ultimately need a version when it goes beyond a trivial hello world test. In certain cases I can optimise requests by using the very useful getAll( keyset ) method. However, I don't see how I can use getAll while still reading versioned entries? Thanks, Sanne From galder at redhat.com Tue Aug 16 11:37:43 2016 From: galder at redhat.com (=?utf-8?Q?Galder_Zamarre=C3=B1o?=) Date: Tue, 16 Aug 2016 17:37:43 +0200 Subject: [infinispan-dev] Style errors :( Message-ID: <69EB565C-3FEC-4F10-A3D6-9A044EF9240B@redhat.com> Hi all, After integrating [1] I'm getting build errors such as: [INFO] --- maven-checkstyle-plugin:2.17:checkstyle (checkstyle) @ infinispan-core --- [INFO] Starting audit... /home/g/0/infinispan/git/core/src/main/java/org/infinispan/marshall/core/internal/InternalExternalizerTable.java:55: error: Using the '.*' form of import should be avoided - org.infinispan.marshall.exts.*. /home/g/0/infinispan/git/core/src/main/java/org/infinispan/marshall/core/ExternalizerTable.java:76: error: Using the '.*' form of import should be avoided - org.infinispan.marshall.exts.*. /home/g/0/infinispan/git/core/src/test/java/org/infinispan/filter/CompositeKeyValueFilterConverter.java:11:1: error: Duplicate import to line 10 - org.infinispan.metadata.Metadata. Even after installing the latest style for IntelliJ [2], reformatting InternalExternalizerTable.java won't fix those how errors. So, what do we do? :( Cheers, [1] https://github.com/infinispan/infinispan/commit/313b19301055c6267c6f2ea9065a7ab1b68099fe [2] https://github.com/infinispan/infinispan/blob/master/ide-settings/intellij/IntelliJ_IDEA_Code_Style.jar -- Galder Zamarre?o Infinispan, Red Hat From sanne at infinispan.org Tue Aug 16 14:21:04 2016 From: sanne at infinispan.org (Sanne Grinovero) Date: Tue, 16 Aug 2016 19:21:04 +0100 Subject: [infinispan-dev] Style errors :( In-Reply-To: <69EB565C-3FEC-4F10-A3D6-9A044EF9240B@redhat.com> References: <69EB565C-3FEC-4F10-A3D6-9A044EF9240B@redhat.com> Message-ID: Please don't forget Eclipse users. It's hard enough to contribute to Infinispan for non-IDEA users; if you enforce specific style rules, at the very least provide compatible formatters for the other IDEs or the barrier for contributors becomes too high. Galder: to answer your specific question I'd personally say you should revert the offending commit. I don't know who did it nor who merged it, but it's just not nice for others that such things get merged carelessly. Errors can be forgiven, but should be fixed by those who create the mess ;) On 16 August 2016 at 16:37, Galder Zamarre?o wrote: > Hi all, > > After integrating [1] I'm getting build errors such as: > > [INFO] --- maven-checkstyle-plugin:2.17:checkstyle (checkstyle) @ infinispan-core --- > [INFO] Starting audit... > /home/g/0/infinispan/git/core/src/main/java/org/infinispan/marshall/core/internal/InternalExternalizerTable.java:55: error: Using the '.*' form of import should be avoided - org.infinispan.marshall.exts.*. > /home/g/0/infinispan/git/core/src/main/java/org/infinispan/marshall/core/ExternalizerTable.java:76: error: Using the '.*' form of import should be avoided - org.infinispan.marshall.exts.*. > /home/g/0/infinispan/git/core/src/test/java/org/infinispan/filter/CompositeKeyValueFilterConverter.java:11:1: error: Duplicate import to line 10 - org.infinispan.metadata.Metadata. > > Even after installing the latest style for IntelliJ [2], reformatting InternalExternalizerTable.java won't fix those how errors. > > So, what do we do? :( > > Cheers, > > [1] https://github.com/infinispan/infinispan/commit/313b19301055c6267c6f2ea9065a7ab1b68099fe > [2] https://github.com/infinispan/infinispan/blob/master/ide-settings/intellij/IntelliJ_IDEA_Code_Style.jar > -- > Galder Zamarre?o > Infinispan, Red Hat > > > _______________________________________________ > infinispan-dev mailing list > infinispan-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/infinispan-dev From slaskawi at redhat.com Tue Aug 16 16:16:36 2016 From: slaskawi at redhat.com (Sebastian Laskawiec) Date: Tue, 16 Aug 2016 22:16:36 +0200 Subject: [infinispan-dev] Style errors :( In-Reply-To: References: <69EB565C-3FEC-4F10-A3D6-9A044EF9240B@redhat.com> Message-ID: Hey Galder, Sanne! The author is no longer anonymous! It was me [1]! Jokes aside; Galder - may I ask you to double check your configuration? I extracted formatter archive and it seems to be fine [2]. Perhaps you didn't enable it (watch out, the formatter name was changed some time ago from Horizon to Infinispan) or this is some tooling problem (which probably should be reported to Jetbrains). Anyway - could you please double check it? I'll try to catch you tomorrow on IRC and talk about it... BTW - There are 2 different errors in your output - the first one is the start import which should be avoided. The second one is duplicated import (also should be avoided). Please don't confuse those two. @Sanne - before you trow a 'git revert' axe on me - may I ask you to import the latest formatter and check if the amount of imports before replacing them with star looks correctly? It looks fine to me but I may have some old installation, old configuration etc... Thanks Sebastian "the Troublemaker" [1] https://www.youtube.com/watch?v=a43kowi2ncI [2] unzip IntelliJ_IDEA_Code_Style.jar and look into attached XML. Those two properties are responsible for star imports.