Skip to content

Implement Actor Model pattern #3232

Open
@iluwatar

Description

@iluwatar

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).

Metadata

Metadata

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions