Let's say I want to implement ProgrammableRemote in akka -
ProgrammableRemote - WatchMovie 1. Tv ! PowerOn 1.1 Tv ! ChangeInput 3 2. DVD ! PowerOn 3. AVReceiver ! PowerOn 3.1 AVReceiver ! SetInput 'DVD'
I could use futures for sequences 1 and 1.1 (and 3. and 3.1). However, this will lead to 1.1 being executed in a separate thread from the actor receiving thread. If I use `pipeTo self ', I will need to process the register for the message" PowerOn completed "from the TV in the" receive "method.
Ideally, I would like to be able to expand the actor to receive responses from other participants dynamically based on outstanding requests. Is there any solution in akka for this use case?
source share