Skip to content

Implement Actor Model pattern #3232

Open

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

Activity

  1. ssrijan-007-sys commented on Apr 14, 2025

    @ssrijan-007-sys
    Contributor

    I'd like to work on this. Planning to use Java's concurrency tools for a basic actor system.

  2. moved this from Todo to In Progress in Java Design Patterns projecton Apr 14, 2025
  3. ssrijan-007-sys commented on Apr 15, 2025

    @ssrijan-007-sys
    Contributor

    ✅ Implementation Completed
    Implemented the Actor Model pattern with automatic actor ID and loose-coupling message communication.

    Added unit tests for all key classes and verified actual message passing logic.

    Increased code coverage to 93.9% (from 45.5%).

    Fixed Spotless formatting violations.

    Build & tests pass locally via mvn clean install and mvn test.

    Quality Gate passed on SonarCloud.

    Please review the PR when you get a chance. I'm happy to make further adjustments if needed!

  4. ssrijan-007-sys commented on Apr 18, 2025

    @ssrijan-007-sys
    Contributor

    ✅ Requested Changes Implemented

    Refactored logging using Lombok’s @slf4j annotation

    Implemented proper message-passing verification in the unit test (ActorModelTest)

    Finalized and committed a fully structured README.md following the project format:

    Includes real-world example, diagrams, benefits/trade-offs, usage, etc.

    Added working links to references, tutorials, and related patterns

    🔁 Kindly review the updates and let me know if any additional changes are needed. Happy to iterate further if required!

  5. added a commit that references this issue on Apr 22, 2025
  6. github-actions commented on Jun 18, 2025

    @github-actions

    This issue is stale because it has been open 60 days with no activity.

  7. ankit09kumar commented on Oct 10, 2025

    @ankit09kumar

    Implementation Completed
    Implemented the Actor Model pattern with automatic actor ID and loose-coupling message communication.

    Added unit tests for all key classes and verified actual message passing logic.

    Increased code coverage to 93.9% (from 45.5%).

    Fixed Spotless formatting violations.

    Build & tests pass locally via mvn clean install and mvn test.

    Quality Gate passed on SonarCloud.

    Please review the PR when you get a chance. I'm happy to make further adjustments if needed!

  8. github-actions commented on Dec 13, 2025

    @github-actions

    This issue is stale because it has been open 60 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions