3. How Noodles Works¶
Noodles deploys a number of experiments to the servers in each deployment round. Noodles checks the requirements on the servers and submit the commands only if the requirements are met. The general procedure is described in the section Deploy Experiments to Servers.
3.1. Deploy Experiments to Servers¶
Initialize the list of experiments in \(E\)
For each deployment round:
Initialize the list of servers in \(S\)
Initialize the list of metrics in \(M\)
For each experiment \(e\) in \(E\):
If any dependent experiment of \(e\) hasn’t been deployed, continue to next experiment (
depends_on
)Noodles checks requirements (See section Check Requirements)
Noodles compares the metrics (results from the above step) to the user-defined expression
If the expression is satisfied, deploy the experiment \(e\) (See section Deploy One Experiment.
If \(E\) is empty, break
Wait for some time (
round_interval
)
3.2. Check Requirements¶
For each requirement ID \(r\) and corresponding commands \(C\):
Initialize the boolean
check := false
If the requirement is static:
If requirement ID \(r\) is not in metrics \(M\), set
check := true
Else if the requirement is dynamic (default behavior):
Set
check := true
If
check = true
, Noodles runs commands \(C\) on each server in \(S\) and treat the results as metrics
3.3. Deploy One Experiment¶
Noodles runs the user-defined commands on the first satisfied server
Initialize the boolean
success := true
If there are any errors and error checking is enabled (
check_any_errors
):Check if there is any matching user-defined error handler (
error_handlers
)If there is a match:
Execute the response commands
If the action is
abort
, raise the error and exitIf the action is
retry
, setsuccess := false
If the action is
continue
, setsuccess := true
Else:
Raise the error and exit
If
success = true
:Remove the current experiment from \(E\)
Remove the satisfied server from \(S\)
If \(S\) is empty, break the inner loop in Deploy Experiments to Servers
Wait for some time (
deployment_interval
)