USER'S APP (developer or AI agent)
Frontend: React / Vue / HTML → served as-is
Backend: TypeScript, Python, Go, Rust → run as-is
Schema: schema.coloa (rules file, read by Coloa)
────────────────────────────────────────────
COLOA PLATFORM (Rust)
Runtime · policy checker · network gateway · audit log
snapshots/rollback · budget caps · data proxy · API · CLI
────────────────────────────────────────────
CONSOLE UI (React)
User code is never converted to Rust. Like Postgres (written in C, you send SQL) or Docker (written in Go, runs your Node app).
| User code | Runs as | Notes |
|---|---|---|
| TypeScript / JS | JS engine in a WebAssembly sandbox (e.g. StarlingMonkey) on Wasmtime | ms start, cheap. MVP target. |
| Python | componentize-py (WASM) or microVM | Native libs (numpy, pandas) need microVM |
| Go | TinyGo → WASM, or microVM | |
| Rust | Direct to WASM | Optional |
| Anything else / heavy | microVM (Firecracker) running a Docker image | Universal fallback. MVP. |
Because Coloa controls the sandbox:
“Policy check” = reading code + schema before deploy (like a linter/scanner) plus runtime enforcement in the data layer. Nothing is rewritten.
| Mode | For | Runs on | |—|—|—| | Functions | Request/response handlers | WebAssembly, scale to zero | | Services | Long-running processes, heavy libs, gRPC, in-instance caches, legacy apps | microVM/container, min/max instances |
pg_dump + object folder. No lock-in.connectors:
core_banking:
type: oracle
host: 10.0.5.20:1521
credential: secret://ORACLE_RO
mode: read_only
allowed_tables: [accounts_view, transactions_view]
| Guarantee | Level 1 | Level 2 |
|---|---|---|
| Secrets hidden from code/agent | ✅ | ✅ |
| Network allowlist | ✅ | ✅ |
| Audit of every query | ✅ | ✅ (at proxy) |
| Read-only / table allowlist | ✅ | ✅ for SQL DBs |
| Row-level rules from schema.coloa | ✅ | ⚠️ limited |
| Snapshot / rollback | ✅ | ❌ |
Admin-approved; still through the gateway (allowlist, secret injection, audit), but no control over data inside.
Rule: user code holds no state; all state lives in shared services.
Load balancer
┌──────────────┼──────────────┐
Coloa node Coloa node Coloa node ← autoscaled
router · WASM/microVM instances · policy + gateway
└──────────────┼──────────────┘
STATE: Postgres + replicas + pooler, S3, Valkey (KV), queues, pub/sub
CONTROL PLANE: 3 nodes, Raft (e.g. openraft) — deploys, policies, secrets, quotas
AUDIT STORE: per-node hash chains, merged and anchored centrally
Same binary everywhere: coloa node --role worker|control|....
| Part | Scales by |
|---|---|
| Functions | More instances per node, more nodes; scale to zero |
| Router/gateway | Stateless; add nodes |
| Database | Postgres replicas + connection pooler (critical) |
| Files | S3-compatible |
| Sessions/cache/rate limits | Valkey |
| Background jobs | Queue + workers scaled on queue length |
| Realtime | Shared pub/sub |
| Budget caps | Shared counters synced every few seconds (may overshoot slightly; document it) |
User config:
scale:
functions: { min: 0, max: 50, target_concurrency: 100 }
jobs: { max_workers: 10 }
region: vn-hcm
Enforcing statelessness (agents often break this): local disk is temporary; policy check warns on module-level in-memory state; stateful work goes through db, kv, storage, queue, realtime.
Deploys: migration once (expand → contract) after snapshot → canary 5% → 100% or auto-rollback.
| Kubernetes | Coloa | |
|---|---|---|
| Runs | Any container | Functions, jobs, frontends, services |
| Unit | Pod (~100s MB, seconds) | WASM instance (few MB, ~1 ms) or microVM (~100 ms from snapshot) |
| Install | Many components | One binary |
| Users | Platform/DevOps engineers | App developers and AI agents |
| Config | Many YAML objects | One coloa.yaml |
| Scale to zero | Add-ons (Knative, KEDA) | Built in |
| Security | Assembled (RBAC, OPA, network policies) | Built in |
| Stateful services | Operators | Delegated to Postgres/S3 |
| Ecosystem | Huge | Ours to build |
Closest comparables: Nomad, Fly.io, Cloudflare Workers — none has the agent-safety layer.
Runs standalone (SMEs, single servers, offline, MVP) or on Kubernetes via an operator (local clouds, large enterprises): K8s manages machines and DB operators; Coloa manages apps, agents, policies, audit.
Monorepo with services, each with its own schema, policies and owners:
company-platform/
├── coloa.yaml
├── apps/{web,admin}/ # React
├── services/
│ ├── orders/ # TS functions + schema.coloa
│ ├── payments/ # Go service
│ ├── reporting/ # Python microVM
│ └── notifications/ # TS queue workers
└── packages/shared-types/
orders.internal etc., authenticated and logged.owners, agents_can_edit, prod_approval per service; a team’s agent edits only its services.coloa deploy --service orders).| Limit | Workaround |
|—|—|
| JS-in-WASM slower for CPU-heavy work | Run as service |
| Big bundles start slower | Snapshot after init; split service |
| Native libraries | microVM services |
| No in-memory state in functions | Services, or kv/realtime |
| Unproven at 100+ services | Start with medium customers |
Own database, own scheduler, prompt-to-app UI. Use Postgres, Valkey, S3-compatible storage, Kubernetes (later).