Deployment View
The Deployment View describes the physical mapping of the software elements to their target environment.
7.1 Infrastructure Topology
Framework M follows a Registry-First deployment philosophy, utilizing pre-bundled Python wheels that contain both backend logic and frontend assets.
┌─────────────────────────────────────────────────────────────┐
│ Application │
│ (Framework M + Business App + UI) │
└─────────────────────────────┬───────────────────────────────┘
│
│ (NATS API / SQL Protocol)
│
┌─────────────────────────────┼───────────────────────────────┐
│ Infrastructure Layer │
│ ┌──────────────┐ ┌──────────────┐ ┌──────┐ │
│ │ PostgreSQL │ │ NATS Server │ │ Redis│ │
│ └──────────────┘ └──────────────┘ └──────┘ │
└─────────────────────────────────────────────────────────────┘
7.2 Deployment Strategy: Registry-First
In production, Framework M applications are deployed as Docker images that install pre-built Python wheels.
- Atomic Bundles: All frontend assets (JS/CSS for the Desk) are packaged inside the wheels and served through the core backend during runtime.
- Stateless Containers: The application containers are stateless and designed to scale horizontally behind a load balancer (e.g., Nginx, Traefik).
- Environment Configuration: A standard "Everything in Env Var" policy ensures configuration is injected at runtime via Kubernetes secrets or
.envfiles.
7.3 High-Scale Production (Recommended)
| Component | Responsibility | Recommended Service |
|---|---|---|
| Ingress | Load balancing, SSL termination, static asset acceleration | Nginx / Traefik |
| App Node | Processing DocType logic and background jobs | Docker / Kubernetes |
| Persistence | Relational state | Managed PostgreSQL |
| Event Bus | High-throughput messaging and task orchestration | NATS JetStream Cluster |
| Cache | Distributed state caching | Redis Cluster |