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.
秉
秉
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 |
7.4 Federated Discovery Topology
In multi-service (Macroservice) environments, the Shell utilizes a Unified Discovery Manifest to resolve remote locations.
- Centralized Ingress: Nginx serves as the single source of truth for the discovery manifest at
/api/gateway/remotes. - Dynamic Resolution: The Shell bootstraps by fetching this manifest, which maps service scopes (e.g.,
finance,inventory) to their physical script locations (remoteEntry.js) and API endpoints (apiUrl). - Edge Deployment: MFEs can be hosted on a separate CDN while the API traffic remains routed through the core ingress, ensuring high performance and domain-isolated security.