It is very deliberately inspired by Erlang and used widely in JVM applications.
It is very deliberately inspired by Erlang and used widely in JVM applications.
foobar = send(actorA, GetDbVal(foo)) + send(actorB, GetDbVal(bar))
Instead you would need to construct some sort of mutable dictionary that keeps track of when it got both messages and when it does, have the actor finally add the stuff together. It’s not always so bad, but when you have actors that are interacting with a lot of other actors and querying many different resources, it becomes a problem. Akka tries to mitigate this problem with the state change function become(), which allows you to build a FSM to handle state transitions. While this helps a lot, it’s not a panacea.
I think I read somewhere that true multi-tasking is in the works for the JVM, so this hopefully won’t always be a problem. As it stands, it’s probably the biggest limitation of the platform atm.