On Fri, Feb 26, 2016 at 1:45 PM, Tal Pressman <kir...@gmail.com> wrote:

> Hi,
>
> So in my case all the sinks return a Future (well, CompletionStage) and I
> want to sequence them.
> I understand the HLists might be a little too complicated (and I'm not
> sure if it can be used from Java...) but I still think something that works
> on a Seq of the least common ancestor could be useful.
>

I don't necessarily agree. Graphs should not grow too large, that is a sign
of mismatch of abstractions to me. While in general we don't recommend
using stream-of-streams this might be one of the cases where it is the best
option.

-Endre


>
> Tal
>
>
>
>
> On Friday, February 26, 2016 at 12:47:33 PM UTC+2, Akka Team wrote:
>>
>> Hi Tal,
>>
>> The issue why you can't convert in the GraphDSL an arbitrary number of
>> materialized values is because that would need HLists (lists if
>> heterogeneous types, a generalization of tuples). What is exactly what you
>> want to achieve?
>>
>> -Endre
>>
>> On Thu, Feb 25, 2016 at 3:50 PM, Tal Pressman <kir...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I find myself needing a way to send messages to several sinks, while
>>> aggregating their materialized values. Trying to use the GraphDSL, I can
>>> either:
>>>
>>>    - Pass a static number of graphs to GraphDSL.create and use their
>>>    materialized values, or
>>>    - Call builder.add for each graph, but lose their materialized
>>>    value, or
>>>
>>> I could also implement some custom sink that calls the appropriate
>>> GraphDSL.create method based on the number of sinks I need connected at
>>> runtime, but that seems ridiculous...
>>> Ideally, I would like to have something like:
>>> def create[S <: Shape, M, Mat](graphs:Seq[Graph[Shape, _ <: M]])(matF:
>>> Seq[M] => Mat)(buildBlock: Builder[Mat] => Seq[Shape] => S): Graph[S,
>>> Seq[Mat]]
>>>
>>> Is there any way of achieving this?
>>>
>>> Thanks,
>>> Tal
>>>
>>>
>>>
>>> --
>>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>>> >>>>>>>>>> Check the FAQ:
>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>> >>>>>>>>>> Search the archives:
>>> https://groups.google.com/group/akka-user
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Akka User List" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to akka-user+...@googlegroups.com.
>>> To post to this group, send email to akka...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Akka Team
>> Typesafe - Reactive apps on the JVM
>> Blog: letitcrash.com
>> Twitter: @akkateam
>>
> --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to