Re: [akka-user] SubFlow.to

2016-02-03 Thread Francesco Di Muccio
Il giorno mercoledì 3 febbraio 2016 01:54:55 UTC+1, rrodseth ha scritto: > > No worries. I wish I had the time and expertise to help. > > I don't mean to be a pest, but since my credibility with management is at > stake [ :) ] can anyone suggest any ways I can tackle the problem of > groupBy

Re: [akka-user] SubFlow.to

2016-02-03 Thread Roland Kuhn
Yes, this is exactly what I was referring to, and I hope it is clear that we don’t want to show this approach to users in the Activator template—we need a better solution :-) Thanks Francesco! Regards, Roland > 3 feb 2016 kl. 10:31 skrev Francesco Di Muccio : >

Re: [akka-user] SubFlow.to

2016-02-03 Thread Richard Rodseth
To be clear, I didn't mean concurrent writes to the same file, I meant writing multiple per-key files simultaneously. And I get that the example given achieves that because of the mapAsync performed on the head of the substream. As far as general semantics of groupBy, I think I get it. Per

Re: [akka-user] SubFlow.to

2016-02-03 Thread Francesco Di Muccio
Il giorno mercoledì 3 febbraio 2016 15:30:29 UTC+1, rrodseth ha scritto: > > Thanks very much. Actually, I would argue this is preferable to what's in > the template now, and both deserve a juicy comment! > > Does groupBy alone introduce any parallelism? With/without fusing? In this > example,

Re: [akka-user] SubFlow.to

2016-02-03 Thread Richard Rodseth
Thanks very much. Actually, I would argue this is preferable to what's in the template now, and both deserve a juicy comment! Does groupBy alone introduce any parallelism? With/without fusing? In this example, if there were n log levels rather than 5, would more than 5 files be written

Re: [akka-user] SubFlow.to

2016-02-03 Thread Richard Rodseth
Ok. I suppose I should examine the GroupBy or SubFlow source code, but if I understand correctly different stages will run concurrently (if fusing is off or async boundaries have been added), but there's not a separate actor for each substream in a SubFlow? On Wed, Feb 3, 2016 at 7:35 AM,

Re: [akka-user] SubFlow.to

2016-02-03 Thread Richard Rodseth
Write sub streams to files as fast as possible. But this latest was just me trying to understand groupBy. I'm unclear whether the substreams are processed concurrently (in the case where there is no mapAsync). In other words if I call to() to pipe all substreams to the same actor will the actor

Re: [akka-user] SubFlow.to

2016-02-03 Thread Roland Kuhn
This is actually not completely correct, the mapAsync is called only once (because prefixAndTail emits only a single element), hence there is no problem with concurrency. The issue is that handing these “live” sources down a stream pipeline carries the risk of losing them between stages

Re: [akka-user] SubFlow.to

2016-02-03 Thread Viktor Klang
I don't understand the question: What are you trying to achieve? On Wed, Feb 3, 2016 at 5:55 PM, Richard Rodseth wrote: > Ok. I suppose I should examine the GroupBy or SubFlow source code, but if > I understand correctly different stages will run concurrently (if fusing is >

Re: [akka-user] SubFlow.to

2016-02-03 Thread Viktor Klang
Put in async boundaries where you want to have them. And writing to file concurrently is likely not faster, but as always needs to be measured. On Wed, Feb 3, 2016 at 6:55 PM, Richard Rodseth wrote: > Write sub streams to files as fast as possible. But this latest was just >

Re: [akka-user] SubFlow.to

2016-02-03 Thread Francesco Di Muccio
Il giorno mercoledì 3 febbraio 2016 19:05:21 UTC+1, rkuhn ha scritto: > > This is actually not completely correct, the mapAsync is called only once > (because prefixAndTail emits only a single element), hence there is no > problem with concurrency. > > Well, I explained myself bad, I meant

Re: [akka-user] SubFlow.to

2016-02-02 Thread Roland Kuhn
Yes, indeed, I didn’t have the time to get that link yesterday. If anyone wants to work on that: contributions are always welcome! :-) Regards, Roland > 1 feb 2016 kl. 23:59 skrev Richard Rodseth : > > For anyone following along, I believe this is the issue Roland refers

Re: [akka-user] SubFlow.to

2016-02-01 Thread Richard Rodseth
Ouch. Thanks. On Mon, Feb 1, 2016 at 1:49 PM, Roland Kuhn wrote: > Hi Richard, > > this is not yet solved, and we have an issue tracking this in akka/akka as > well. It is not certain that we will be able to fix this before 2.4.2 comes > out or whether the API addition that

Re: [akka-user] SubFlow.to

2016-02-01 Thread Roland Kuhn
Hi Richard, this is not yet solved, and we have an issue tracking this in akka/akka as well. It is not certain that we will be able to fix this before 2.4.2 comes out or whether the API addition that is necessary will have to wait until 2.4.3. Regards, Roland > 1 feb 2016 kl. 22:34 skrev

Re: [akka-user] SubFlow.to

2016-02-01 Thread Richard Rodseth
For anyone following along, I believe this is the issue Roland refers to https://github.com/akka/akka/issues/18969 On Mon, Feb 1, 2016 at 2:28 PM, Richard Rodseth wrote: > Ouch. Thanks. > > On Mon, Feb 1, 2016 at 1:49 PM, Roland Kuhn wrote: > >> Hi

[akka-user] SubFlow.to

2016-01-31 Thread Richard Rodseth
I have run into this issue https://github.com/typesafehub/activator-akka-stream-scala/issues/37 I want to group a stream and write each substream to a separate file. A pretty common use case, I'd imagine. The old version of the GroupLog example showed a groupBy() followed by a to() Because of