How olivmath/wess works
Main Components
a) API Layer:
• HTTP Server (Actix-web based on the Rust ecosystem)
• Three main operation groups: Read, Write, and Run operations
• Middleware components for validation and error handling
b) Worker System:
• Reader Worker (with cache)
• Writer Worker
• Runner Worker (with WebAssembly engine)
c) Storage:
• RocksDB for persistent storage
• In-memory cache for Reader
d) Monitoring & Observability:
• Prometheus metrics endpoint
• Grafana dashboards
• Logging system
Component Relationships
a) Write Flow:
HTTP Request → Write Ops Controller → Writer Channel → Writer Worker → RocksDB
b) Read Flow:
HTTP Request → Read Ops Controller → Reader Channel → Reader Worker → Cache/RocksDB → Response
c) Run Flow:
HTTP Request → Run Ops Controller → Runner Channel → Runner Worker → WASM Engine → Response
Detailed Component Breakdown
┌─ API Layer ─────────────────────┐
• POST / (Create WASM) │
• PUT /{id} (Update WASM) │
• GET /{id} (Read WASM) │
• POST /{id} (Execute WASM) │
• ┘
• ▼
┌─ Channel System ───────────────┐
• WriteJob Channel │
• ReadJob Channel │
• RunJob Channel │
• ┘
• ▼
┌─ Workers ──────────────────────┐
• ┌─ Reader ─┐ ┌─ Writer ─┐ │
• Cache │ │ │ │
• ┘ └──────────┘ │
• ┌─ Runner ────────────────┐ │
• WASM Engine │ │
• ┘ │
• ┘
• ▼
┌─ Storage ─────────────────────┐
• RocksDB │
• ┘
Additional Elements
Supporting components:
• Metrics collectors
• Logging system
• Configuration management
• Error handling flows
Important Notes
• Error handling paths
• Monitoring points
• Configuration injection points
• Cache invalidation flows
Testing Components
A separate section showing:
• Behave testing framework integration
• K6 load testing setup
• Test WASM modules