Hi Endre,
Yes I think it will be very useful. Though I currently can easily
send messages in my akka cluster, I can't orchestrate a process
that requires multiple messages to be send via several actors and
the receipts to be collected. Doing so with just a series of
messages becomes tedious (a lot of testing and the intent of the
code is lost).
I did an impl so far of a flow engine, using an FSM actor. It
makes msg exchange as a flow that takes an input (Sync of an index
creation operation), sends it around the cluster, expects 1 reply
from each remote actor and sends a msg to the master actor on
success or a timeout msg (to all remote actors & master) on
failure. Kind of like
val keepers:Seq[Future[ActorRef]] = ... actor refs
obtained via context.actorSelection(path).resolveOne(timeout)
val flow=Flow.start(5 seconds)
.sendToAllF(keepers)
.expectNMessages(keepers.size) {
case SyncAck(index)=>
..... got ack
}
flow.execute(SyncAck(index))
.onSuccess { in=>
...
}.onTimeout {
...