Re: [infinispan-dev] Stream operations under lock

2017-03-29 Thread Dan Berindei
On Wed, Mar 29, 2017 at 4:24 PM, William Burns wrote: > > > On Wed, Mar 29, 2017 at 4:05 AM Dan Berindei wrote: >> >> On Tue, Mar 28, 2017 at 8:54 PM, William Burns >> wrote: >> > >> > >> > On Tue, Mar 28, 2017 at 12:52 PM Dan

Re: [infinispan-dev] Stream operations under lock

2017-03-29 Thread William Burns
On Wed, Mar 29, 2017 at 4:05 AM Dan Berindei wrote: > On Tue, Mar 28, 2017 at 8:54 PM, William Burns > wrote: > > > > > > On Tue, Mar 28, 2017 at 12:52 PM Dan Berindei > > wrote: > >> > >> On Tue, Mar 28, 2017 at 6:44 PM,

Re: [infinispan-dev] Stream operations under lock

2017-03-29 Thread Dan Berindei
On Tue, Mar 28, 2017 at 8:54 PM, William Burns wrote: > > > On Tue, Mar 28, 2017 at 12:52 PM Dan Berindei > wrote: >> >> On Tue, Mar 28, 2017 at 6:44 PM, William Burns >> wrote: >> > >> > >> > On Tue, Mar 28, 2017 at 11:24 AM

Re: [infinispan-dev] Stream operations under lock

2017-03-28 Thread William Burns
On Tue, Mar 28, 2017 at 12:52 PM Dan Berindei wrote: > On Tue, Mar 28, 2017 at 6:44 PM, William Burns > wrote: > > > > > > On Tue, Mar 28, 2017 at 11:24 AM Sanne Grinovero > > wrote: > >> > >> Hi Will, > >> > >> I'm confused

Re: [infinispan-dev] Stream operations under lock

2017-03-28 Thread Dan Berindei
On Tue, Mar 28, 2017 at 6:44 PM, William Burns wrote: > > > On Tue, Mar 28, 2017 at 11:24 AM Sanne Grinovero > wrote: >> >> Hi Will, >> >> I'm confused about the premise; when you state >> >> " the Consumer is called while holding the lock for the

Re: [infinispan-dev] Stream operations under lock

2017-03-28 Thread William Burns
On Tue, Mar 28, 2017 at 11:24 AM Sanne Grinovero wrote: > Hi Will, > > I'm confused about the premise; when you state > > " the Consumer is called while holding the lock for the given key and > subsequently released after the Consumer operation completes." > > What are the

Re: [infinispan-dev] Stream operations under lock

2017-03-28 Thread Sanne Grinovero
Hi Will, I'm confused about the premise; when you state " the Consumer is called while holding the lock for the given key and subsequently released after the Consumer operation completes." What are the transaction boundaries? I see two options, please correct me so I understand: A)

Re: [infinispan-dev] Stream operations under lock

2017-03-28 Thread William Burns
On Mon, Mar 27, 2017 at 9:02 PM Galder Zamarreño wrote: > > -- > Galder Zamarreño > Infinispan, Red Hat > > > On 21 Mar 2017, at 17:16, Dan Berindei wrote: > > > > I'm leaning towards option 1. > > > > Are you thinking about also allowing the consumer

Re: [infinispan-dev] Stream operations under lock

2017-03-28 Thread William Burns
On Tue, Mar 28, 2017 at 9:27 AM Galder Zamarreño wrote: > > -- > Galder Zamarreño > Infinispan, Red Hat > > On 21 Mar 2017, at 18:50, William Burns wrote: > > > > On Tue, Mar 21, 2017 at 1:42 PM William Burns > wrote: > On Tue, Mar

Re: [infinispan-dev] Stream operations under lock

2017-03-28 Thread Galder Zamarreño
--Galder ZamarreñoInfinispan, Red HatOn 21 Mar 2017, at 18:50, William Burns wrote:On Tue, Mar 21, 2017 at 1:42 PM William Burns wrote:On Tue, Mar 21, 2017 at 12:53 PM Radim Vansa wrote:On 03/21/2017 04:37 PM, William Burns

Re: [infinispan-dev] Stream operations under lock

2017-03-28 Thread Galder Zamarreño
-- Galder Zamarreño Infinispan, Red Hat > On 22 Mar 2017, at 10:51, Radim Vansa wrote: > > On 03/21/2017 06:50 PM, William Burns wrote: >> >> >> On Tue, Mar 21, 2017 at 1:42 PM William Burns > > wrote: >> >>On Tue,

Re: [infinispan-dev] Stream operations under lock

2017-03-23 Thread Dan Berindei
On Wed, Mar 22, 2017 at 11:51 AM, Radim Vansa wrote: > On 03/21/2017 06:50 PM, William Burns wrote: >> >> >> On Tue, Mar 21, 2017 at 1:42 PM William Burns > > wrote: >> >> On Tue, Mar 21, 2017 at 12:53 PM Radim Vansa

Re: [infinispan-dev] Stream operations under lock

2017-03-23 Thread William Burns
On Wed, Mar 22, 2017 at 5:51 AM Radim Vansa wrote: > On 03/21/2017 06:50 PM, William Burns wrote: > > > > > > On Tue, Mar 21, 2017 at 1:42 PM William Burns > > wrote: > > > > On Tue, Mar 21, 2017 at 12:53 PM Radim Vansa

Re: [infinispan-dev] Stream operations under lock

2017-03-21 Thread William Burns
On Tue, Mar 21, 2017 at 4:28 PM Tristan Tarrant wrote: > > > On 21/03/17 16:37, William Burns wrote: > > Some users have expressed the need to have some sort of forEach > > operation that is performed where the Consumer is called while holding > > the lock for the given key

Re: [infinispan-dev] Stream operations under lock

2017-03-21 Thread Tristan Tarrant
On 21/03/17 16:37, William Burns wrote: > Some users have expressed the need to have some sort of forEach > operation that is performed where the Consumer is called while holding > the lock for the given key and subsequently released after the Consumer > operation completes. > > Due to the

Re: [infinispan-dev] Stream operations under lock

2017-03-21 Thread William Burns
On Tue, Mar 21, 2017 at 1:42 PM William Burns wrote: > On Tue, Mar 21, 2017 at 12:53 PM Radim Vansa wrote: > > On 03/21/2017 04:37 PM, William Burns wrote: > > Some users have expressed the need to have some sort of forEach > > operation that is

Re: [infinispan-dev] Stream operations under lock

2017-03-21 Thread William Burns
On Tue, Mar 21, 2017 at 12:53 PM Radim Vansa wrote: > On 03/21/2017 04:37 PM, William Burns wrote: > > Some users have expressed the need to have some sort of forEach > > operation that is performed where the Consumer is called while holding > > the lock for the given key and

Re: [infinispan-dev] Stream operations under lock

2017-03-21 Thread William Burns
On Tue, Mar 21, 2017 at 12:17 PM Dan Berindei wrote: > I'm leaning towards option 1. > This is actually what I have implemented right now. The big problem I find is the lack of configuring the operation. For example I know that users will require being able to pass in a

Re: [infinispan-dev] Stream operations under lock

2017-03-21 Thread Radim Vansa
On 03/21/2017 04:37 PM, William Burns wrote: > Some users have expressed the need to have some sort of forEach > operation that is performed where the Consumer is called while holding > the lock for the given key and subsequently released after the > Consumer operation completes. Seconding

Re: [infinispan-dev] Stream operations under lock

2017-03-21 Thread Dan Berindei
I'm leaning towards option 1. Are you thinking about also allowing the consumer to modify the entry, like JCache's EntryProcessors? For a consumer that can only modify the current entry, we could even "emulate" locking in an optimistic cache by catching the WriteSkewException and running the

[infinispan-dev] Stream operations under lock

2017-03-21 Thread William Burns
Some users have expressed the need to have some sort of forEach operation that is performed where the Consumer is called while holding the lock for the given key and subsequently released after the Consumer operation completes. Due to the nature of how streams work with retries and performing the