O'Reilly logo

Akka Essentials by Munish K. Gupta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Agents

Akka provides another construct called agents. As part of the transactors we saw the usage of Refs and how they support and coordinate synchronous change of multiple locations in a transaction. On the other hand, agents provide independent, asynchronous change of individual locations. Agents provide shared access to the immutable state.

Akka agents are modeled on the Clojure agents. Clojure agents are reactive, not autonomous, that is, there is no imperative message loop and no blocking received. Clojure agents are native threads that are managed in thread pools for performance. Agents' primary plus point is that they run on a different thread. One can get the value of the agent without any block calls, and any state changes are effected ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required