Hi, 

I'd like to process the http request with a bunch of flows like this:

  val bindingFuture = Http().bindAndHandleAsync({
    request => 
        Source.single(request)
          .via(flow1)
          .via(flow2)
          .via(flowN)
          .runWith(Sink.head)
    
  }, interface = "localhost", port = 9001)

This way works but it requires the graph get materialized for every request 
(probably involve a lot of actor creation overhead)

Is it a good practice? Or I should use 1 running graph to process all the 
requests?

Any suggestion?

Thanks
Leon



-- 
>>>>>>>>>>      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