How katanaml/katana-skipper works
Project Type and Purpose
• Katana ML Skipper is an event-driven, microservice-based ML workflow engine.
• It provides a FastAPI Web API (“api”) and a generic workflow engine (“workflow”) that orchestrate a set of ML microservices via RabbitMQ.
• Sample ML services (Boston Housing data): data ingestion, model training, model serving, plus a JavaScript “mobilenetservice” and a “logger” service demonstrate extensibility.
File Structure Analysis
• Top level:
• api/ → FastAPI Web API implementation
• workflow/ → Workflow logic, JSON definitions
• services/ → Sample ML microservices (dataservice, trainingservice, servingservice, mobilenetservice)
• rabbitmq/ → RabbitMQ broker deployment definitions
• logger/ → Dedicated logging microservice
• skipper-lib/ → Python client library for event communication
• skipper-lib-js/ → Node.js client library for event communication
• Kubernetes and Docker Compose manifests at root (docker-compose.yml, .yaml under api/, rabbitmq/, services, workflow).
• Persistent volumes/persistent volume claims for services that write artifacts (servingservice, trainingservice).
• Standard patterns: Pub/Sub via RabbitMQ, microservice separation by functionality, containerized deployments.
Key Components
a. Ingress & API Layer
• NGINX Ingress / Load Balancer
• Skipper FastAPI service (“api” pods/deployment)
• Swagger UI / HTTP interface
b. Workflow Engine
• “workflow” service reading workflow.json, communicating tasks to microservices
c. Message Broker
• RabbitMQ cluster (statefulset, service)
• Exchanges & Queues defined by skipper-lib
d. Microservices
• DataService (Python)
• TrainingService (Python, writes to PV)
• ServingService (Python, two replicas, reads from PV)
• MobileNetService (Node.js)
• Logger service (Python)
e. Supporting Libraries
• skipper-lib (Python)
• skipper-lib-js (JavaScript)
f. Storage & Model Artifacts
• Persistent Volume / PVC for models
• Model zip files under services/models (for reference)
Relationships & Data Flows
• HTTP request → NGINX → API → calls Workflow Engine
• Workflow Engine publishes “task created” events to RabbitMQ exchanges
• Each microservice subscribes to its queue, processes events, publishes “task complete” or intermediate events
• Logger service subscribes to all event exchanges for auditing
• API polls or subscribes to results via RabbitMQ (or queries state via Workflow Engine)
• ServingService responds to external prediction requests (optionally via API)
Architectural Patterns & Principles
• Event-driven, asynchronous communication (Pub/Sub)
• Microservices: each service independently containerized, language-agnostic
• Repository of reusable communication libraries (skipper-lib, skipper-lib-js)
• Separation of concerns: API, orchestration (workflow), compute (services), messaging (RabbitMQ), logging
• Declarative deployment with Docker Compose and Kubernetes manifests