Files
homelab-design/diagrams/dual-workflow-engines.mmd

74 lines
2.1 KiB
Plaintext

```plaintext
%% Dual Workflow Engine Strategy (ADR-0009)
%% Flowchart showing Argo vs Kubeflow decision and integration
flowchart TB
subgraph trigger["🎯 Workflow Triggers"]
nats["NATS Event"]
api["API Call"]
schedule["Cron Schedule"]
end
subgraph decision["❓ Which Engine?"]
question{{"Workflow Type?"}}
end
subgraph kubeflow["🔬 Kubeflow Pipelines"]
direction TB
kfp_train["ML Training<br/>✅ Component caching"]
kfp_eval["Model Evaluation<br/>✅ Metric tracking"]
kfp_exp["Experiment Comparison<br/>✅ MLflow integration"]
end
subgraph argo["⚡ Argo Workflows"]
direction TB
argo_dag["Complex DAG<br/>✅ Advanced control flow"]
argo_batch["Batch Processing<br/>✅ Parallelization"]
argo_ingest["Document Ingestion<br/>✅ Simple steps"]
end
subgraph hybrid["🔗 Hybrid Pattern"]
direction TB
argo_orch["Argo Orchestrates"]
kfp_step["KFP via API"]
argo_orch --> kfp_step
end
subgraph integration["📡 Integration Layer"]
direction TB
events["Argo Events<br/>EventSource + Sensor"]
end
%% Flow from triggers
nats --> events
api --> decision
schedule --> events
events --> decision
%% Decision branches
question -->|"ML training<br/>with caching"| kubeflow
question -->|"Complex DAG<br/>batch jobs"| argo
question -->|"ML + complex<br/>orchestration"| hybrid
%% Kubeflow use cases
kfp_train --> kfp_eval
kfp_eval --> kfp_exp
%% Argo use cases
argo_dag --> argo_batch
argo_batch --> argo_ingest
classDef trigger fill:#f39c12,color:black
classDef kubeflow fill:#4a90d9,color:white
classDef argo fill:#ef6c00,color:white
classDef hybrid fill:#8e44ad,color:white
classDef integration fill:#27ae60,color:white
class nats,api,schedule trigger
class kfp_train,kfp_eval,kfp_exp kubeflow
class argo_dag,argo_batch,argo_ingest argo
class argo_orch,kfp_step hybrid
class events integration
```