A Python microservice that implements a workflow execution engine with HTTP and gRPC interfaces.
- HTTP server for health checks and metrics
- gRPC server implementing the ExecutorService defined in proto/executor.proto
- Prometheus metrics integration
- Concurrent workflow execution
- Python 3.8+
- Make (for using the Makefile)
- Create a virtual environment and install dependencies:
make setup
- Install the package in development mode:
source venv/bin/activate
make install
Start the service with:
make run
This will start:
- HTTP server on port 8000 (configurable via HTTP_PORT env var)
- gRPC server on port 50051 (configurable via GRPC_PORT env var)
- Prometheus metrics server on port 9090 (configurable via PROMETHEUS_PORT env var)
GET /health
- Health check endpointGET /metrics
- Custom metrics endpoint
The service implements the following gRPC methods:
ExecuteWorkflow
- Execute a workflow with streaming responseGetWorkflowStatus
- Get status of a workflowCancelWorkflow
- Cancel a workflow
If you modify the proto file, regenerate the Python code with:
make proto
make test
make lint
make clean
GRPC_PORT
- Port for the gRPC server (default: 50051)HTTP_PORT
- Port for the HTTP server (default: 8000)PROMETHEUS_PORT
- Port for the Prometheus metrics server (default: 9090)
Copyright (c) 2025 Windsurf