Skip to content

Instantly share code, notes, and snippets.

@matt-forster
Last active October 30, 2023 23:12
Show Gist options
  • Save matt-forster/6a5f9e1f23f025ff4364c02b5c1865a6 to your computer and use it in GitHub Desktop.
Save matt-forster/6a5f9e1f23f025ff4364c02b5c1865a6 to your computer and use it in GitHub Desktop.
sequenceDiagram
    GRPC Client->>+Service: Request
    
    par Task Queue
        Service--)Temporal: Execute Workflow Definition
        Note over Service,Temporal: Cached: Workflow Parameters
        Temporal-)+Worker One: Start Workflow Execution
    end
    par Task Queue
        Worker One-)Temporal: Execute Activity Definition
        Note over Temporal,Worker One: Cached: Activity Parameters
        Temporal->>+Worker Two: Start Activity Execution
    end
    Worker Two-->>-Temporal: Activity Result
    Note over Worker Two,Temporal: Cached: Activity Result
    Worker One->>Temporal: Get Activity Result
    Temporal-->>Worker One: Activity Result
    Worker One-->>-Temporal: Workflow Result
    Note over Worker One,Temporal: Cached: Workflow Result
    Service->>Temporal: Get Workflow Result
    Temporal-->>Service: Workflow Result
    Service->>-GRPC Client: Response
Loading
flowchart TD
    Activities -->|Definitions| Workflows
    Workflows -->|Definitions| Client
    Workflows --->|Registration| Worker
    Activities --->|Registration| Worker
   

    Client(Temporal Client) --> Run[fa:fa-car Run]
    Client(Temporal Client) --> Worker
    Worker(Temporal Worker) --> Run[fa:fa-car Run]
Loading
sequenceDiagram
    GRPC Client->>+Service: Request
    
    par Task Queue
        Service--)Temporal: Execute Workflow Definition
        Note over Service,Temporal: .ExecuteWorkflow()
        Temporal-)+Worker One: Start Workflow Execution
    end
    par Task Queue
        Worker One-)Temporal: Execute Activity Definition
        Note over Temporal,Worker One: .ExecuteActivity()
        Temporal->>+Worker Two: Start Activity Execution
    end
    Worker Two-->>-Temporal: Activity Result
    Worker One->>Temporal: Get Activity Result
    Note over Worker One,Temporal: .Get()
    Temporal-->>Worker One: Activity Result
    Worker One-->>-Temporal: Workflow Result
    Service->>Temporal: Get Workflow Result
    Note over Service,Temporal: .Get()
    Temporal-->>Service: Workflow Result
    Service->>-GRPC Client: Response


Loading
sequenceDiagram
    note left of GRPC Client: Modelling Network Requests
    note over Service: Temporal Client
    note over Temporal: Temporal Cluster
    note over Worker One: Temporal Client+Worker
    note over Worker Two: Temporal Client+Worker
    GRPC Client->>+Service: Request
    
    par Task Queue
        Service-)Temporal: Execute Workflow Definition
        Temporal-)+Worker One: Start Workflow Execution
    end
    par Task Queue
        Worker One-)Temporal: Execute Activity Definition
        Temporal->>+Worker Two: Start Activity Execution
    end
    Worker Two-->>-Temporal: Activity Result
    Worker One->>Temporal: Get Activity Result
    Temporal-->>Worker One: Activity Result
    Worker One-->>-Temporal: Workflow Result
    Service->>Temporal: Get Workflow Result
    Temporal-->>Service: Workflow Result
    Service->>-GRPC Client: Response


Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment