Draft: Start Workflow Execution
Objective
Start a (minimalist) workflow execution (and for that end shape the structure of the gRPC service)
Related issues
Highlights
- gRPC contract updates
- Controllers
- Workflow Execution Loop
gRPC contract updates
-
ExecuteWorkflow
is a bidirectional streaming RPC that allows theDuoWorkflowExecutor
to send aExecuteWorkflowRequest
message and receiveExecuteWorkflowResponse
messages. -
ExecuteWorkflowRequest
— RequestsDuoWorkflowExecutor
may send to theDuoWorkflowService
-
StartWorkflow
— Create and start a new workflow -
CommandResult
— Send results of a command execution to the DuoWorkflowService -
RestartWorkflow
— Restarts a workflow execution optionally from Checkpoint ID
-
-
ExecuteWorkflowResponse
— ResponsesDuoWorkflowService
may send to theDuoWorkflowExecutor
-
ExecuteCommand
— Instruct DuoWorkflowExecutor to execute a script or binary -
HttpRequestCommand
— Instruct DuoWorkflowExecutor to make an HTTP request -
ReadFileCommand
— Instruct DuoWorkflowExecutor to read a file -
WriteFileCommand
— Instruct DuoWorkflowExecutor to write a file -
WorkflowCreated
— Notify DuoWorkflowExecutor that a new workflow has been created -
WorkflowCheckpointed
— Notify DuoWorkflowExecutor that a workflow has been checkpointed -
WorkflowCompleted
— Notify DuoWorkflowExecutor that a workflow has been completed
-
Controllers
- gRPC service has only one long-running, bi-directional endpoint
- "Routing" is done based on requests to this endpoint
- We use "Controllers" as a pattern to distribute implementation while maintaining familiarity humans working on this code-base
- To be implemented in this MR:
- StartWorkflow
- To be scaffolded in this MR
- CommandResult
- RestartWorkflow
Workflow execution loop
- Logic for centralised execution loop for each workflow
- Triggered by all/most controllers
Edited by Sri Rang