How apache/openwhisk works
Main Components
a. Client-Facing Layer:
• REST API Gateway
• CLI (wsk)
• Web UI (Playground)
b. Core Components:
• Controller (action management, authentication)
• Invoker (action execution)
• Scheduler (resource management)
• Load Balancer
c. Storage Layer:
• CouchDB/Cosmos DB (for state management)
• Kafka (message queue)
• Zookeeper (distributed coordination)
d. Runtime Layer:
• Docker Container Pool
• Various Language Runtimes (Node.js, Python, Java, etc.)
Component Relationships
a. Control Flow:
• Client → API Gateway → Controller
• Controller → Load Balancer → Scheduler → Invoker
• Invoker → Container Pool
b. Data Flow:
• Controller ↔ CouchDB (action/auth storage)
• Controller → Kafka → Invoker (activation requests)
• Invoker → CouchDB (activation results)
Specific Design Elements
• Blue: External interfaces (API Gateway, CLI)
• Green: Core processing (Controller, Invoker)
• Yellow: Storage (CouchDB, Kafka)
• Orange: Runtime (Container Pool)
b. Component Grouping:
• Separate control plane from data plane
Implementation Details
Technical annotations for:
• REST API endpoints
• Kafka topics
• Database collections
• Container lifecycle
Architectural Patterns
Highlight:
• Event-driven architecture
• Message-based communication
• Container orchestration
• Distributed system coordination
[Client Layer]
• ↓
[API Gateway Layer]
• ↓
[Control Layer (Controller/Scheduler)]
• ↓
[Messaging Layer (Kafka)]
• ↓
[Execution Layer (Invoker/Containers)]
• Component types
• State transitions
• Scaling boundaries
Remember to:
Monitoring touchpoints
This will provide a complete view of OpenWhisk's architecture while maintaining clarity about component relationships and system flow.