-
-
Notifications
You must be signed in to change notification settings - Fork 102
-
Howdy all!
I have just come across your project and am evaluating it to help me solve a problem. I want to build a state machine that allows people to configure infrastructure devices (routers, switches, etc). Here are some questions I have:
- to me a state machine will encapsulate the logic to change the state of a network device. For example, upgrading code. Beginning state is v1.0 end state would be v2.0. Is this a reasonable use case for this library?
- Will your library allow me to have an unhappy path? Say the disk on a router is full and i can't clear up disk space to copy the ISO img. I will need to update my database with all the useful details so a person can manually fix that, then the state machine can pick up where it left off. I noticed that guards might be the way to go here? If so can you elaborate?
- I want to have state meta data, such as a state number. For example, the initial state might have a number=1001 and every other state might increment 2001, 3001, etc. I am assuming I should create custom state classes that have any property i want? Is this an anti-pattern?
- Can a StateMachine have StateMachines? Each phase of my state machine will have phases of their own that might end up unsuccessful. Is this possible and is it anti-pattern?
Thanks for all the hard work! Sorry for the newbie questions :-)
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment