Is there a package for management to control the start order of nodes? [closed]
Hello, experts.
This question is the following this link
I wanted to manage the start order of nodes I developed.
Is there a package for management to control the start(initialization) order of nodes?
Would you tell me information about that's packages or tools?
Let's imagine there are many nodes which have dependency of the start moment of others.
For example, the start order of "B" node have dependency on the start order of "A" node. This mean is that "B" node can start to initialize for itself after receiving a signal which "A" node will send to "B" node.
When "A" node is initializing, It may be that we want to stop the progress of initializing the "B" node by a signal like initialization fail.
For a small number of nodes, we just add some code for check that.
We can use a topic named /start
or We can use a service and client.
But, for many number of nodes, we have to add similar code in many times.
Patently , It is a duplicate work.
And, when we want to change it's construction about the order, we will have a burden.
Is there a package or tool to help this problem solve easily?
If there is no that, maybe I'll make it.
// On this description, "initialization" of nodes is not "initialization" of linux's process.
// It is the initialization, in your code, as dynamic memory allocation, instance initialization.
You can use the bash script to sequentially start the nodes in the order you need
@0xd1ma . Thank you for a comment.
Yes, right. If we use the bash script to sequentially, then it will start the nodes in the order I need. But, exactly I want to control the order of initialization progress in node code.
@0xd1ma .
Please think about this. Despite that "A" node started first, "A" node will be albe to finish more late than others.