Hi Muki,


On Sun, Nov 22, 2015 at 4:49 PM, Muki <[email protected]> wrote:

> Hi,
>
> I have a stream pipeline like this:
>
> progress queue    +---------> mapping  +---------+
>                                                  |
>    ^    ^    ^                                   |
>    |    |    |                                   v
>    |    |    +------------------------+          +-- merge +--->
>    |    |                             |          ^
>    |    +---------+                   |          |
>    +              +                   +          |
> data  +--------> stage1   +--------> stage2 +----+
>
>
>
>    - *data* is a single source that generates the data to be processed
>    - *progress queue* is a
>    Source.queue[Progress](10, OverflowStrategy.dropHead) where the
>    progress should be emitted
>    - *stage1 *and* stage2* are emitting elements to the next stage and
>    also the the *progress queue*
>
>
> So these are actually two different data pipelines, which are only
> connected by the *progress queue* and the *merge* in the end.
> The initial implementation just sent messages to a progress actor, which
> then send it over a play-websocket. Now I want to do this
> with akka-http and the websocket describes as a Flow[Message, Message].
>
> I read "Accessing the materialized value inside the Graph"
> <http://doc.akka.io/docs/akka-stream-and-http-experimental/2.0-M1/scala/stream-graphs.html#Accessing_the_materialized_value_inside_the_Graph>,
> but couldn't figure out how to implement this kind of pattern.
>

That will not likely to help you, as that let's you access the materialized
value as a value of a Source. What you will need actually is to model your
progress emitting stages as GraphStages instead. They will let you to
expose a second output port for the only purpose of sending progress
information. Those are available in M1 but not really documented
unfortunately. Also, that will mean that your stage1 and stage2 will no
longer be Flows but three-port stages (which means that you would need to
use the graph DSL to connect them).

-Endre


>
> Thanks in advance,
> Muki
>
> --
> >>>>>>>>>> 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.
>



-- 
Akka Team
Typesafe - Reactive apps on the JVM
Blog: letitcrash.com
Twitter: @akkateam

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