Skip to content
AlekseyAleev edited this page Aug 2, 2012 · 1 revision

Base Defenitions

Step - single action performed over environment (for example, provision vm or chef run).

Action - single action performed inside particular step (for example, check ssh port or run shell script).

Flow - set of steps with specified execution order dependencies between them.

The main difference between steps and actions is that first one is DSL level entity and describes what to do from user perspective while second is internal entity describes some atomic action. Usually to perform one step several actions need to be done. There are two types of actions - sync and async. Async action execution performed in two phases: actually start action and then periodically pull its for completion. While sync action simply executed in separate thread pool.

Implementation Details

Suppose executing flow in the picture bellow (currently executed steps in green):

Workflow

To maintain flow execution actor model for concurrency is used. For every flow, step or action special actor is created. We are using Akka actor library. All actors sources are located here.

Actors

Flow Coordinator actor - coordinates flow execution process. Main responsibilities - decide which steps should be executed now and when flow should be finished.

Step Coordinator actor - coordinates single step execution. Main responsibilities - decide which actions should be executed now as a result of previously executed actions.

Async Action Executor actor - responsible for starting async action and pulling its result.

Sync Action Executor actor - async action executor that pull thread pool for sync completion.

Beat Source actor - periodically sends hurt beats to async executors to pull action result.

Workflow Execution Details

Normal execution

Workflow execution

Workflow execution timeout

Workflow timeout

FlowCoordinator activity

FlowCoordinator activity

StepCoordinator activity

StepCoordinator activity

Clone this wiki locally