# ADR-0002: Separate Executors From Schedulers ## Status Accepted ## Context EmboFlow needs to support multiple runtime modes now and later: - direct Python execution - Docker-isolated execution - HTTP-based execution - local scheduling - future Kubernetes scheduling - future Volcano scheduling If execution logic and scheduling logic are coupled together, migration from single-host operation to cluster operation becomes costly. ## Decision The architecture will separate: - Executor: how node logic runs - Scheduler: where and under what dispatch policy tasks run V1 executors: - Python - Docker - HTTP V1 scheduler: - Local Reserved future schedulers: - Kubernetes - Volcano ## Consequences ### Positive - Cleaner evolution path - Better runtime abstraction - Less refactoring required for cluster migration ### Negative - Slightly more abstraction in V1 than the immediate deployment requires ## Notes User-injected code should default to Docker execution, while trusted platform logic may use Python execution.