Cette page est affichée en anglais. Une traduction française est en cours.
ScriptsMay 18, 2026·3 min de lecture

Akka — Resilient Distributed Actor Framework for the JVM

Akka is a toolkit for building concurrent, distributed, and fault-tolerant applications on the JVM using the Actor Model. It provides tools for clustering, persistence, streaming, and HTTP services in Scala and Java.

Prêt pour agents

Cet actif peut être lu et installé directement par les agents

TokRepo expose une commande CLI universelle, un contrat d'installation, le metadata JSON, un plan selon l'adaptateur et le contenu raw pour aider les agents à juger l'adaptation, le risque et les prochaines actions.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Akka Framework
Commande CLI universelle
npx tokrepo install c49078fe-52f7-11f1-9bc6-00163e2b0d79

Introduction

Akka is a JVM toolkit that implements the Actor Model to simplify building concurrent and distributed systems. Originally inspired by Erlang's process model, it provides a high-level abstraction for managing state, concurrency, and fault tolerance without manual thread management.

What Akka Does

  • Provides lightweight actors that encapsulate state and communicate via asynchronous messages
  • Offers cluster membership, sharding, and distributed data for multi-node deployments
  • Includes Akka Streams for backpressure-aware stream processing
  • Supports event sourcing and CQRS through Akka Persistence
  • Ships Akka HTTP for building RESTful and WebSocket services

Architecture Overview

Akka runs on the JVM and uses a dispatcher-based execution model where actors share thread pools. Each actor has a mailbox for queued messages and processes them one at a time, eliminating the need for locks. The cluster module uses a gossip protocol for membership and failure detection. Akka Persistence uses event journals (Cassandra, JDBC, or others) to durably store actor state changes.

Self-Hosting & Configuration

  • Add Akka dependencies via sbt, Maven, or Gradle for Scala or Java projects
  • Configure via application.conf using the HOCON format (Lightbend Config)
  • Cluster settings define seed nodes, split-brain resolution, and down strategies
  • Akka Persistence requires a journal and snapshot plugin (Cassandra, R2DBC, or JDBC)
  • Logging integrates with SLF4J; default backend is Logback

Key Features

  • Supervision hierarchies automatically restart failed actors for self-healing systems
  • Cluster Sharding distributes actors across nodes by entity ID
  • Akka Streams implements the Reactive Streams specification with backpressure
  • Location transparency: actors communicate the same way whether local or remote
  • Akka Projections reads event journals for CQRS read-side processing

Comparison with Similar Tools

  • Erlang/OTP — the original actor model platform; Akka brings similar patterns to the JVM ecosystem
  • Orleans (Microsoft) — virtual actor model for .NET; Akka offers more explicit lifecycle control
  • Vert.x — event-driven toolkit for the JVM; Akka adds supervision trees and cluster sharding
  • Quarkus — reactive Java framework; Akka provides a more opinionated actor-based concurrency model
  • Project Loom (Virtual Threads) — lightweight threads in Java; Akka adds distribution, persistence, and fault tolerance on top

FAQ

Q: Is Akka free to use? A: Akka changed its license to the Business Source License (BSL 1.1) in 2022. It is free for small companies and non-production use; larger production deployments require a commercial license from Lightbend.

Q: Can I use Akka with Java? A: Yes. Akka provides full Java APIs alongside Scala APIs for all modules.

Q: What is the difference between Classic and Typed Akka? A: Typed Akka (akka-actor-typed) uses compile-time message type checking and is the recommended API. Classic Akka uses untyped ActorRef and is maintained for backward compatibility.

Q: How does Akka handle node failures in a cluster? A: The cluster gossip protocol detects unreachable nodes. A configurable split-brain resolver decides whether to down unreachable members or keep them as candidates for recovery.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires