I have a virtual machine scale out process. I will call the virtual machine platform to create the machine, and then call initialization process.
But the virtual machine platform returns one by one. I will create an initialization process for each machine, but I want to wait for the initialization process of all machines to end in the scale out process. What’s the best practice?
I’m not sure I fully understand the question. All SDKs support async invocation of child workflows and activities and waiting for all the futures/promises to complete. Which SDK are you planning to use?
What is the reason in your diagram that you use activity to create a machine and then start “Server Init” workflows on callback? To me the more natural flow would be starting a child workflow per server and let the child workflow handle all the activities related to that server including “create machine” one.
If creating a machine fails, how does temporary save the state
All the state including local variables and blocking calls is automatically preserved in the DB Temporal service relies on. So you don’t need to do any state preservation in your application explicitly.
I don’t understand the meaning of the following code: