iluwatar / iluwatar/java-design-patterns

Implement Actor Model pattern

Open
#3,232 6 comments 0 reactions 1 assignee View on GitHub

@ssrijan-007-sys is already working on this.

Since Apr 14, 2025.

epic: pattern Stale type: feature
Dominant language
Java
Stars
94.7k
Forks
27.4k
Avg merge
3d 4h
Merged PRs (30d)
10

Description

Description

The Actor Model is a concurrency paradigm in which independent “actors” encapsulate state and behavior, interacting solely through asynchronous message passing. This approach avoids shared mutable state and promotes highly scalable, loosely coupled systems. Actors can create new actors, send messages to other actors, and handle messages they receive.

Key Elements
  • Actors: Independent units that manage their own state and process messages.
  • Message Passing: Non-blocking communication between actors; no direct method calls or shared variables.
  • Isolation: Each actor’s state is private, limiting concurrency issues.
  • Supervision: Some actor frameworks use a hierarchy where parent actors supervise the lifecycle and errors of child actors.

References

  1. Akka Documentation (Actor Model in JVM)
  2. The Actor Model (Wikipedia)
  3. Java Design Patterns – Contribution Guidelines

Acceptance Criteria

  • Create a new module or package named actor-model (or similar).
  • Provide a minimal actor-based system where multiple actors exchange messages to accomplish a task.
  • Demonstrate key concepts: actor creation, message handling, isolation of state, and error handling or supervision.
  • Include a README (.md file) explaining the pattern, including code walkthrough and any relevant diagrams.
  • Write tests verifying actor interactions, ensuring correct behavior under concurrent loads.
  • Pass all repository checks (style conventions, CI build/tests).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.