Hi!

My first implementation was almost the same - one flow instantiation for 
one request. Right now I have one long living flow and push elements into 
it and then send them back to akka-http. What I want to achieve is to wire 
my flow with flow processing inside akka-http

вторник, 10 февраля 2015 г., 9:39:15 UTC+6 пользователь Steve Myers написал:
>
> Hi, have you seen the recent akka-http-microservice 
> <https://github.com/theiterators/akka-http-microservice> example?  It may 
> not be exactly what you want but does a great job showing how to do 
> akka-http routing.
>
> On Monday, February 9, 2015 at 7:21:52 PM UTC-8, Alexey Romanchuk wrote:
>>
>> Hello!
>>
>> As I understand from docs akka-http seamless integrates with akka-stream 
>> by passing flow to handleWith method. Also we have well known routing dsl 
>> from spray with all these nested directives. But I can not figure out how 
>> to use them together. 
>>
>> I want to have routing dsl together with seamless akka streams 
>> integration. Something like this:
>>
>> val flow1 = Flow[(Int, String), X] //X can be marshalled
>>
>> respondWithHeaders(...) {
>> path("...") {
>> get {
>>                     parameters("...".as[Int]?) { param =>
>>      optionalCookie("...") { cookie =>
>>      (param, cookie) -> flow1
>>      }
>>         }
>> }
>> } ~
>> ...
>> }
>>
>> Dsl is very useful to extract parameters and matches and flows is very 
>> natural way to build responses. This is not concrete API, but an idea how 
>> it may looks like. Any thoughts?
>>
>> Thanks!
>>
>> p.s. If I miss something obvious form docs please point me to it :)
>>
>

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