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 [email protected].
To post to this group, send email to [email protected].
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