progress queue +---------> mapping +---------+ | ^ ^ ^ | | | | v | | +------------------------+ +-- merge +---> | | | ^ | +---------+ | | + + + |data +--------> stage1 +--------> stage2 +----+
--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 akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
+---> map to progress +---> progress sink | +data +----> stage1 +----> broadcast + | +------------------------------------------------> stage2
override def onPush(elem: TrajectoryBoxes, ctx: Context[RotatedTrajectoryBoxes]): SyncDirective = {
val angle = calculateAngle(elem)
progress(25, "angles calculated")
val rotated = rotate(elem, angle)
progress(100, "boxes rotated")
ctx.push(rotated)
}
Hi Endre,Thanks for the hint with GraphStage. I tried to use the code from UnzipWith2 and adjust it to my needs, but the API was not really clear for me.When should I call pull and what effects does it have?
I wasn't able to create a queue inside the GraphStage (e.g. like a Source that gets flattened into the progress output).
In the end I had the feeling to build a Broadcast stage. E.g.
+---> map to progress +---> progress sink|+data +----> stage1 +----> broadcast+|+------------------------------------------------> stage2
which only works for 1-progress-output per stage. However I would like to be able to ouput more then one progress in one stage. Eg.
override def onPush(elem: TrajectoryBoxes, ctx: Context[RotatedTrajectoryBoxes]): SyncDirective = {
val angle = calculateAngle(elem)
progress(25, "angles calculated")
val rotated = rotate(elem, angle)
progress(100, "boxes rotated")
ctx.push(rotated)
}