Akka is a JVM toolkit for concurrent and distributed applications. It centers the actor programming model as one abstraction for scaling both up across cores and out across servers, while supplying a runtime and supporting tools for scalable deployments. section 1.0 section 1.8
Its core unit is the actor: a small programmable message-processing component. Actors receive immutable messages one at a time, run behavior in response, and can send messages to other actors. Sending is asynchronous, so a sender does not wait for a response. section 1.2
Actor code is separated from thread placement and physical location. A message may be processed on an available local thread or by an actor on another server, allowing deployment placement to change without hardcoding threads or RPC-style networking into business logic. section 1.2 section 1.1
Table 1.1 Differences between the traditional approach and the Akka approach (view table figure)
Compare an actor-based design with a traditional mix of threads, database state, polling, and synchronous RPC. The actor approach favors immutable events, event-driven updates, asynchronous messaging, and isolation of failed components. section 1.3
Akka supports application structure beyond message delivery. It provides facilities for configuring and scheduling actors, connecting them across a network, and building clusters. Supervision lets one component watch others, choose whether to continue, restart, or stop after failures, and isolate trouble rather than require every part to keep working. section 1.2 section 1.5.4
From wallet to scalable application
A minimal wallet receives deposit messages and first prints each amount. Later variants retain a total in a variable, retain state through behavior, and deactivate or reactivate the wallet. The same message-oriented approach is positioned for interactive applications such as a business chat system handling many simultaneous events. section 2.0 section 1.3
Use Akka’s model when an application needs to:
- Handle concurrent work through messages instead of entangling threads, locks, and shared mutable state. section 1.1 section 1.3
- Push interactive updates when events occur instead of polling for current information. section 1.3
- Keep useful parts running when individual components fail, under supervisory decisions. section 1.5.4
