Architecture - rsys-bshankar/ai-ran-smo GitHub Wiki
Architecture
Golden rules
- Every service listens on container port 8000 (the GUI's nginx on 8080). Only R1
:8080, the GUI:3000and Postgres:5432are published. - Modules call each other only through R1 Termination, using
smo_shared.r1_client.R1Client. No direct container-to-container calls. - One shared Postgres schema, created and upgraded by the
migrateone-shot service (Alembic); every service waits for it. - Services are stateless: state lives in Postgres (CI enforces this with
scripts/check_statelessness.py).
Platform modules
| Module | Role | R1 route |
|---|---|---|
| R1 Termination | rApp-facing gateway: token check against SME, caller-role policy, prefix-routed proxy | host 8080 |
| SME | CAPIF core: invoker/provider onboarding, OAuth2 tokens, service discovery | /sme |
| DME | Data management and exposure: producers, types, data jobs | /dme |
| Onboarding | CSAR package validation and ApplicationPackage lifecycle |
/onboarding |
| rApp Management | RAppInstance lifecycle, per-instance identity |
/rapp-mgmt |
| RAN NF OAM | O1: NETCONF/RESTCONF CM writes, alarms, PM, KPIs, safeguards | /ran-nf-oam |
| A1 Related | A1 policy and enrichment-info mapping | /a1-related |
| NFO / FOCOM | Workload and O-Cloud inventory management | /nfo, /focom |
| AIMgF, MLMR, MLLF | AI/ML lifecycle (TS 28.105), model repository, model loading | /aimgf, /mlmr, /mllf |
| RAN Analytics, MDAF | Analytics producers; the TS 28.104 MDA function | /mdaf |
| Intent Service | TS 28.312 intents | /intent-service |
| SO SMOS, SA SMOS | Service orders; assurance monitors and remedial actions | /so-smos, /sa-smos |
Each module's README has its high-level design, low-level design and unit tests. Its standards basis says whether the design is O-RAN, 3GPP, both, or this build's own logic.
Reference rApps
Energy Saving, Mobility Optimization, Coverage Optimization and Traffic Steering. Each is packaged as a CSAR and runs a closed loop from O1 PM data through the governed model lifecycle to verified O1 CM writes. Packaging format: smo/docs/RAPP_PACKAGING.md.
Schema changes
Every schema change is an Alembic revision, and within a minor release it must be additive (expand, then contract across two releases). CI proves it by running the previous release's code on the new schema and upgrading a previous-release database that holds data. See smo/docs/adr/0001-schema-migrations.md.