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

  1. Initialize the list of experiments in \(E\)

  2. For each deployment round:

    1. Initialize the list of servers in \(S\)

    2. Initialize the list of metrics in \(M\)

    3. For each experiment \(e\) in \(E\):

      1. If any dependent experiment of \(e\) hasn’t been deployed, continue to next experiment (depends_on)

      2. Noodles checks requirements (See section Check Requirements)

      3. Noodles compares the metrics (results from the above step) to the user-defined expression

      4. If the expression is satisfied, deploy the experiment \(e\) (See section Deploy One Experiment.

    4. If \(E\) is empty, break

    5. Wait for some time (round_interval)

3.2. Check Requirements

  1. For each requirement ID \(r\) and corresponding commands \(C\):

    1. Initialize the boolean check := false

    2. If the requirement is static:

      • If requirement ID \(r\) is not in metrics \(M\), set check := true

    3. Else if the requirement is dynamic (default behavior):

      • Set check := true

    4. If check = true, Noodles runs commands \(C\) on each server in \(S\) and treat the results as metrics

3.3. Deploy One Experiment

  1. Noodles runs the user-defined commands on the first satisfied server

  2. Initialize the boolean success := true

  3. If there are any errors and error checking is enabled (check_any_errors):

    1. Check if there is any matching user-defined error handler (error_handlers)

    2. If there is a match:

      1. Execute the response commands

      2. If the action is abort, raise the error and exit

      3. If the action is retry, set success := false

      4. If the action is continue, set success := true

    3. Else:

      1. Raise the error and exit

  4. If success = true:

    1. Remove the current experiment from \(E\)

    2. Remove the satisfied server from \(S\)

    3. If \(S\) is empty, break the inner loop in Deploy Experiments to Servers

    4. Wait for some time (deployment_interval)