The overall architecture
How are forecast-run responsibility and external processing divided between modules and processes?
The local consistency rule determines the structure of the forecast API. Forecast computation handles deferred work in a separate process. Interval assignment, input versions, forecast approval and energy balance comparison are modules within the API. The measurement source sends versioned values to a time-series store. Forecast computation reads a frozen input version and writes a run manifest and forecast. The forecast API manages approvals and current comparison references in the relational metadata store. A separate comparison path combines an approved forecast with a selected measurement revision. The energy balance team reads the comparison; corrections to actual measurements trigger new comparisons while preserving historical forecasts.
Starting point Corrections extend the comparison history.
Assumptions for the example case
A fictional example design for a generation facility using fixed 15-minute intervals and separate forecast and measurement versions. Each interval spans 900 seconds, inclusive at the start and exclusive at the end; a measurement at exactly 900 seconds belongs to the next interval. All figures and test targets are illustrative assumptions.
Runtime components and datastores
Runtime topology
Forecasting and comparison system
Each comparison binds forecast version, measurement revision and the same interval.
Domain responsibilities within the API
Internal responsibilities
Modules remain within the API process.
Map responsibilities to runtime components
| Domain task | Runtime | Responsibility |
|---|---|---|
| Interval assignment | Forecast API | Assigns time series to the same time period and unit system. |
| Input version | Forecast API | Records input provenance and revision for a run. |
| Forecast approval | Forecast API | Freezes the approved forecast version. |
| Energy balance comparison | Forecast API | Compares specific forecast and measurement revisions. |
| Forecast computation | Separate background process | Processes stored work and external feedback. |
| Measurement data source | External boundary | Provides or confirms the evidence agreed for this case. |
Interval assignment
- Runtime
- Forecast API
- Responsibility
- Assigns time series to the same time period and unit system.
Input version
- Runtime
- Forecast API
- Responsibility
- Records input provenance and revision for a run.
Forecast approval
- Runtime
- Forecast API
- Responsibility
- Freezes the approved forecast version.
Energy balance comparison
- Runtime
- Forecast API
- Responsibility
- Compares specific forecast and measurement revisions.
Forecast computation
- Runtime
- Separate background process
- Responsibility
- Processes stored work and external feedback.
Measurement data source
- Runtime
- External boundary
- Responsibility
- Provides or confirms the evidence agreed for this case.
Computation jobs use frozen manifests
Computation jobs use frozen manifests.
Each comparison identifies the forecast version, measurement revision and matching time interval; later actual measurements do not change historical forecasts.
Time-series revisions, run manifests and comparison versions must express the same valid state. The exercise specifies the input and expected result.
- Alternative considered
- A separate service for every module would spread the guarantee that comparisons identify fixed forecast and measurement versions for one interval across additional network boundaries.
- Trade-off
- Common schema changes require coordinated releases.
- Reassess
- A substantially different load or independent ownership for forecast computation justifies revisiting process boundaries.
Try it yourself
Classify interval assignment, forecast computation and the measurement source as a module, process or external system. Add the authoritative datastore.
A hint for your attempt
A domain responsibility becomes a process only when it has its own execution unit.
Compare with a possible solution
- Boundaries
- Interval assignment is a module in the forecast API; forecast computation is a separate process; the measurement source is external.
- Storage
- Time-series revisions, run manifests and comparison versions hold authoritative evidence. Each comparison identifies the forecast version, measurement revision and matching interval; later actual measurements preserve historical forecasts. The shared transaction protects this relationship; external responses remain separate evidence.
Apply to your project
Which planned service boundary would distribute a currently local guarantee across the network?