[akka-user] Re: [akka-streams] Generic streams and abstract types

2017-07-13 Thread Jeff
My understanding from the documentation is that using Http.singleRequest will fail requests when in a backpressure situation, while using a MergeHub with the flow will in fact backpressure. Is that a correct understanding? Jeff On Thursday, July 13, 2017 at 4:46:39 AM UTC-7,

[akka-user] Re: [akka-streams] Generic streams and abstract types

2017-07-13 Thread johannes . rudolph
On Wednesday, July 12, 2017 at 9:08:52 PM UTC+2, Jeff wrote: > > As for the issue of complexity, it's actually not as complex as it sounds. > I'm using Http().superPool() to make api requests and I wanted to avoid > having to create a separate stream for every single iteration of api > request

[akka-user] Re: [akka-streams] Generic streams and abstract types

2017-07-12 Thread Jeff
Thanks for the great suggestions - I eventually came to the "custom tuple" solution myself and it seems to work well. As for the issue of complexity, it's actually not as complex as it sounds. I'm using Http().superPool() to make api requests and I wanted to avoid having to create a separate

[akka-user] Re: [akka-streams] Generic streams and abstract types

2017-07-12 Thread johannes . rudolph
Hi Jeff, your API seems quite complex. I don't know the purpose of it so I cannot suggest anything but I'd try to simplify. :) That said, your problem seems to be that you cannot write a concrete type that would express the dependency between the two components of the tuple `(RequestBuilder,

[akka-user] Re: [akka-streams] Generic streams and abstract types

2017-07-10 Thread Jeff
Any thoughts? On Thursday, July 6, 2017 at 2:23:50 PM UTC-7, Jeff wrote: > > Here is a strawman program which illustrates the issue I am having > > trait RequestBuilder { > type Out > > def complete(p: Promise[Out]): Unit > } > > def makeRequest(in: RequestBuilder): Source[(RequestBuilder, >