End-to-end data flow
Data starts in partner product databases, flows through TulaImporter into the ERP, and is pushed onward to the warehouse for analytics.
flowchart TB
subgraph SRC[Source Systems]
S1[(BiometricsProd)]
S2[(ConnectProd)]
S3[(GatewayProd)]
end
subgraph IMP[TulaImporter — Service Fabric]
I1[TulaImport<br/>Stateful Service<br/>Hourly schedule]
I2[SFImportApi<br/>Stateless API]
end
subgraph ERP[TulaERP — Service Fabric]
E1[(TulaERP DB)]
E2[TulaERPApi<br/>Stateless API]
E3[SFDataWarehouseSendQueue<br/>Stateful Service]
end
subgraph DW[TulaDW]
W1[TulaDWApi<br/>Port 8132]
W2[(SSAS Tabular Model<br/>75 tables)]
end
UI[TulaERPUINeo<br/>MVC App]
S1 -->|EF read| I1
S2 -->|EF read| I1
S3 -->|EF read| I1
I1 -->|writes| E1
I2 -.queues jobs.-> I1
E2 --- E1
E2 -->|enqueue| E3
E3 -->|/api/dataload/load| W1
W1 --> W2
UI -->|REST| E2
UI -->|REST| I2
UI -->|read SSAS| W2
classDef src fill:#0c1120,stroke:#48bb78,color:#c8d0dc
classDef imp fill:#0a0f1a,stroke:#00b4c5,color:#c8d0dc
classDef erp fill:#0a0f1a,stroke:#1cd4e6,color:#c8d0dc
classDef dw fill:#0a0f1a,stroke:#ed8936,color:#c8d0dc
classDef ui fill:#0a0f1a,stroke:#fc5c65,color:#c8d0dc
class S1,S2,S3 src
class I1,I2 imp
class E1,E2,E3 erp
class W1,W2 dw
class UI ui
The four layers
1. Source systems
Three partner databases feed Tula:
- BiometricsProd — biometric device data (weight, BP, glucometer, etc.)
- ConnectProd — engagement / call notes from the Connect platform
- GatewayProd — eligibility, enrollment, demographic data
Each has its own connection string and its own enable/disable flag in dbo.Settings.
2. TulaImporter (Service Fabric)
Two services:
- TulaImport (stateful) — orchestration. Runs on a schedule (default 1h), creates an
ImportJobrow per source, queues it on a Service Fabric reliable queue, and processes one job at a time. Stale jobs inProcessingfor >6h are auto-failed. - SFImportApi (stateless) — REST surface. Lets the UI list jobs, queue ad-hoc runs, and inspect status.
The actual pull logic lives in Sources/<Name>DB/<Name>Import.cs.
3. TulaERP (Service Fabric)
- TulaERPApi — the operational API: clients, members, items, orders, inventory, invoices, billing events.
- SFDataWarehouseSendQueue — a separate stateful service that owns the outbound stream to TulaDW. It runs three modes side-by-side: an incremental queue, a 15-minute periodic dimension refresh, and an on-demand full-database sync.
4. TulaDW
- TulaDWApi — HTTP ingestion API on port
8132with three styles of endpoint: telemetry events, direct table loads, and schema registration. - SSAS Tabular Model —
TulaDWdatabase, 24 dimensions, 42 facts, 3 bridges. Powers reports.
What runs where
flowchart LR
subgraph Cluster1[xm cluster]
T1[TulaImporter app]
end
subgraph Cluster2[prod-tula or xm cluster]
T2[TulaERP app]
T3[TulaDW services]
end
subgraph Browser
UI[TulaERPUINeo]
end
T1 --> T2
T2 --> T3
UI --> T2
UI --> T1
classDef sf fill:#0a0f1a,stroke:#00b4c5,color:#c8d0dc
classDef br fill:#0c1120,stroke:#fc5c65,color:#c8d0dc
class T1,T2,T3 sf
class UI br
Deployment scripts live alongside each .sfproj:
| App | Script |
|---|---|
| TulaImporter | TulaImporter/Scripts/deploy-{env}-xm-importer.ps1, Deploy-prod-tula.ps1 |
| TulaERP | TulaERP/Service Fabric/TulaERPSf/Scripts/deploy-{env}-{cluster}-tulaerp.ps1 |