Modeling Actors in a Single System: Balancing Complexity and Ergonomics #7
technoplato
started this conversation in
Architecture & Developer Ergnomics
Replies: 1 comment
-
https://discord.com/channels/795785288994652170/1219752076951945297/1219752949018919014 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to open a discussion about a key architectural decision we're currently facing: should we model all of our actors in a single system?
Initially, my understanding was that I could use system.get with a declared system ID to retrieve any actor that has been started with actorRef.started. However, it turns out that those actors must belong to the same system, meaning they must be invoked "from some child of the root".
While this design decision makes perfect sense from XState's perspective, it raises concerns about potentially ending up with an enormous, difficult-to-understand system if we're not careful. I believe that with careful attention to detail and iteration, we can discover an approach that strikes a good balance in terms of laying out our actor hierarchy. However, it's important to acknowledge that reaching this balance may require some trial and error.
I propose that we proceed under the assumption that we will model our application within a single actor system and iterate on how to make that as ergonomic as possible. This approach will allow us to explore different strategies and learn from our experiences along the way.
To facilitate transparent discussions about these unknowns and foster collaboration, I've decided to open this conversation here on GitHub Discussions. By having these conversations in the open, we can gather insights from the broader team and ensure that our decisions are well-documented and easily accessible.
Please share your thoughts, ideas, and concerns regarding this architectural decision. Let's work together to find the best approach for modeling our actors and building a maintainable, scalable system.
Looking forward to hearing your perspectives!
Beta Was this translation helpful? Give feedback.
All reactions