Skip to main content
Akka HTTP is based on an Actor-Based Model
23 Nov, 2024

Akka HTTP is based on an Actor-Based Model

What does it mean to be Actor-Based? 

The actor model was introduced over 50 years ago (1973) to make it easier to design and develop distributed applications. Like object-oriented paradigms, everything is an object, in actor-based model, everything is an actor.  

The actor model uses asynchronous messaging as the default way of communication. Actors communicate with each other via message passing. Every actor has its private state and a “mailbox” to receive messages.  

When an actor receives a message, it can take different actions based on the message it receives. An example is a message-receiving actor can send a message as a response to a message. 

Each computing unit is an actor that communicates to other units by sending messages to other actors. Actors are used as basic computation primitives to build distributed and concurrent systems. 

 

Akka HTTP 

Akka fully embraces the supervisor-worker paradigm and every actor needs to be assigned a supervisor. This means the let-it-crash philosophy is enforced by default. This supervision creates a hierarchy based on parent-child actor relationships where a child actor only has access to what its parent allows. 

Akka HTTP is a module of Akka that implements a full server- and client-side HTTP stack on top of an Akka actor. The Akka-HTTP module provides a DSL that can be used to create something called routes. These routes define how specific HTTP requests are handled. One use case for Akka HTTP is using Play Framework to deploy a backend behind an Akka HTTP server. 

 

References 

Maliszewski, Kajetan. Secure LwM2M IoT streaming data pipelines in Hospworks. Diss. ETSIS_Telecomunicacion, 2019. 

Cappelletti, Andrea. Dynamically Synthesizing Distributed Applications From Architecture Specifications. Diss. University of Illinois at Chicago, 2022. 

Su, Li, et al. "Banyan: a scoped dataflow engine for graph query service." arXiv preprint arXiv:2202.12530 (2022). 

Penev, Danail, and Phil Trinder. "Comparing Reliability Mechanisms for Secure Web Servers: Actors, Exceptions and Futures." (2019). 

Schlüter, Alexander. "Strategies for Modern Internet Applications and Development of an Internet of Things Prototype with Akka and Kubernetes." 

Mensah M. Alkebu-Lan