Previously i was using Java Future object and Await.result
to fetch the response from an Akka actor. This allowed me to create a bridge between Java 6 code base and Akka.
Disadvantages: Threads blocking during long running tasks
I've moved to Java 8 and was looking at making use of non-blocking support to replace the Await.Result
with a callback. In theory this will work well. However i notice in latest version of Typesafe HelloAkka tutorial with Java 8 that Akka Inbox is used to handle response rather than Future;
- Is Inbox use preferred option over Future?
- When would Future (or Completable Future) be a better option?