Skip to content

Conversation

@AlirezaShamsoshoara
Copy link
Member

PR Summary

This PR adds a complete guide to Monarch actors (docs/ACTORS.md) that serves as the reference for understanding and implementing the actor model in Monarch applications.

The documentation covers:

  • Actor fundamentals: Definition, core characteristics (isolation, sequential processing, asynchronous communication, location transparency)
  • Actor lifecycle: Complete walkthrough from creation through termination, including spawn, construction, initialization, running, and termination phases
  • Endpoints and messaging: Detailed explanation of the @endpoint decorator and messaging patterns including call_one(), call(), broadcast(), rref(), and stream()
  • Actor context: How to access runtime information via the context API including message rank, actor instance details, and process references
  • ActorMesh: Organization of actors in multidimensional structures with slicing, indexing, and broadcast operations
  • Advanced patterns: Explicit response ports, actor supervision, channels for direct communication, and ValueMesh for state sharing
  • Best practices: Actor design principles, state management, endpoint design, error handling, performance optimization, and testing strategies

The guide includes code examples, diagrams for visualization, and a quick reference card for common patterns. This documentation complements the existing Meshes guide and provides developers with everything needed to build robust actor-based distributed systems in Monarch.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 18, 2025
@AlirezaShamsoshoara
Copy link
Member Author

-- Adding @colin2328 @johnwhumphreys and @dulinriley since I cannot add reviewer!

@colin2328
Copy link
Contributor

@AlirezaShamsoshoara can you import to fbsource?

@meta-codesync
Copy link

meta-codesync bot commented Nov 19, 2025

@AlirezaShamsoshoara has imported this pull request. If you are a Meta employee, you can view this in D87400422.

@meta-codesync meta-codesync bot closed this in b57ad38 Nov 21, 2025
@meta-codesync
Copy link

meta-codesync bot commented Nov 21, 2025

@AlirezaShamsoshoara merged this pull request in b57ad38.

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

Labels

CLA Signed This label is managed by the Meta Open Source bot. Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants