Re: [akka-user] [Streams 1.0-M4] From Source[Future[T], Unit] to Source[T, Unit]?

2015-03-03 Thread kermitas
Thanks Jim. W dniu wtorek, 3 marca 2015 01:29:04 UTC+1 użytkownik Jim Hazen napisał: I think the answer is in the {Scala, Java}Docs of mapAsync: Transform this stream by applying the given function to each of the elements as they pass through this processing step. The function returns a

Re: [akka-user] [Streams 1.0-M4] From Source[Future[T], Unit] to Source[T, Unit]?

2015-03-02 Thread Jim Hazen
I think the answer is in the {Scala, Java}Docs of mapAsync: Transform this stream by applying the given function to each of the elements as they pass through this processing step. The function returns a Future and the value of that future will be emitted downstreams. As many futures as

Re: [akka-user] [Streams 1.0-M4] From Source[Future[T], Unit] to Source[T, Unit]?

2015-03-02 Thread Luis Ángel Vicente Sánchez
You should use mapAsync instead of map. On 2 Mar 2015 18:03, kermitas kermi...@gmail.com wrote: Hello, as an input I have Source[PageDetails, Unit] and I also have method which transform PageDetails to Future[CategoryVector]: def categorizePage(page: PageDetails): Future[CategoryVector]

[akka-user] [Streams 1.0-M4] From Source[Future[T], Unit] to Source[T, Unit]?

2015-03-02 Thread kermitas
Hello, as an input I have Source[PageDetails, Unit] and I also have method which transform PageDetails to Future[CategoryVector] : def categorizePage(page: PageDetails): Future[CategoryVector] By using map method I can change Source[PageDetails, Unit] to Source[Future[ CategoryVector], Unit]:

Re: [akka-user] [Streams 1.0-M4] From Source[Future[T], Unit] to Source[T, Unit]?

2015-03-02 Thread kermitas
THANK YOU Luis!! :) That is what I needed. Let's imagine that I have just one stream run in one JVM. Do you know how many futures will be evaluated and wait for completion? You know, I can not have billion of futures in memory :/. Will this be auto-regulated by back pressure of if not then