Because there are many potential implementations, we explicitly opted out
of flatMap. For now.

A minor correction: Akka Streams (Flow etc)  will never become a standard
for the JVM.
The standardization effort is Reactive Streams and that is for interop
between implementations. As such it does not prescribe any DSL as that will
vary between JVM langs and libraries.

Cheers,
V
On Apr 24, 2014 4:24 PM, "Patrik Nordwall" <patrik.nordw...@gmail.com>
wrote:

> Hi Rüdiger,
>
> Yes, several flattening operators are missing.
>
> /Patrik
>
>
> On Thu, Apr 24, 2014 at 12:01 PM, Rüdiger Klaehn <rkla...@gmail.com>wrote:
>
>> Hi All,
>>
>> I just took a quick look at the new reactive streams API and in
>> particular the scala DSL at
>> http://doc.akka.io/api/akka-stream-experimental/0.2/index.html#akka.stream.scaladsl.Flow.
>>
>> Looks pretty good so far. I especially like that this is supposed to
>> evolve into a standard for the entire JVM and not just Scala.
>>
>> One question:
>>
>> Is there a reason that there is no flatMap defined in the DSL? Something
>> like
>>
>> def flatMap[U](f: T => Flow[U]) : Flow[U]
>>
>> I think this would be quite useful for dynamically generating flows based
>> on the values produced by another flow.
>>
>> Example: you have a Flow[URL], and want to dynamically construct a flow
>> to handle reading from the URL based on the content (protocol, etc.) of the
>> URL. Then you want to flatten the whole thing so that you just get a
>> Flow[ByteString].
>>
>> This might not be the best example, but I hope you get the idea.
>>
>> I don't see any reason why it should be impossible to construct a flatMap
>> with the underlying primitives (Producers).
>>
>> cheers,
>>
>> Rüdiger
>>
>> --
>> >>>>>>>>>> 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 http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
>
> Patrik Nordwall
> Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
> Twitter: @patriknw
> JOIN US. REGISTER TODAY! <http://www.scaladays.org/>
> Scala <http://www.scaladays.org/>
> Days <http://www.scaladays.org/>
> June 16th-18th, <http://www.scaladays.org/>
> Berlin <http://www.scaladays.org/>
>
>  --
> >>>>>>>>>> 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 http://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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to