Report Processing

Table of Contents

1. Summary

A report in ORE Studio is a scheduled request for the ORE engine to value a scope of trades as at a date. Processing one means reading those trades and the market data they need out of the domain databases, assembling them into the input the engine consumes, handing that input to the compute grid, and recording what the engine returns.

The cluster covers that path end to end: where a run comes from, what it does, what executes it, what data it moves, how each end of it is built, and how part of it can be replaced while its dependencies are still being built. It is the architecture a report feature is implemented against, and it is written to be read before changing any of the components on the path — ores.reporting, ores.compute, ores.scheduler and ores.workflow.

2. Reading order

2.1. What a report is, and how a run comes to exist

Report definition and schedule — start here. The definition, its parameters and its run configuration, the job the scheduler holds on its behalf, and the instance that records a run. Read it first because everything below assumes the distinction it draws: the definition is configuration, the instance is state.

2.2. What a run does

Report execution pipeline — the six phases end to end, what each is responsible for, which of them can be replaced, and what every phase may assume of the phase before it.

2.3. What executes the phases

Report execution orchestration — read immediately after the pipeline, because it answers the question the pipeline raises: nothing calls a phase directly. The workflow engine invokes each one, rebuilds the chain on every dispatch, and re-dispatches unfinished work after a restart. The obligations this puts on a phase — idempotence above all — are what the phase pages below must satisfy.

2.4. How a scheduled run acts, and how many runs share the platform

Report execution at scale — read after the orchestration page. It follows one scheduled run through every service, from the definition to the completed instance. It defines the run grant and the token exchange that let a run with no caller act as its tenant and party, and the fair queues that let thousands of runs from many tenants share the platform.

2.5. Why the phases are shaped the way they are

Report processing data characteristics — the three kinds of data a run moves and the access pattern of each. Read it before the phase pages, because it explains their interfaces: why the domain reads must be bulk and scope-limited, why the engine's input is addressed by a digest of its inputs, and why results are loaded in bulk into narrow tables. It also states what to measure, and what each measurement would falsify.

2.6. The phases, in the order they run

Report pre-processing — selecting the trades, resolving the market data they need, mapping both into the engine's documents, and packaging an archive named by a digest of its inputs. The most expensive phase, and the one with the most dependencies.

Report compute handoff — the contract with the grid: what a run submits, what a workunit requires, what the worker does, what comes back, and what a run must guarantee about submitting twice.

Report post-processing — unpacking the engine's output and loading it into a result store shaped for the queries that will read it.

2.7. Running part of it

Report execution substitution — read after the phases it replaces. The two ends of the pipeline can each be replaced by a prepared substitute: pre-processing by an input archive that already exists, post-processing by recording only where the output is. This is what allows the pipeline and the workflow around it to be exercised before the trade and market data components are ready, and the page states what such a run proves and what it does not.

2.8. The reference

Report processing interfaces — every message and every storage key a run uses, with its publisher and consumer. Read last, or alongside whichever phase page you are implementing; it is a list rather than an argument.

3. What this cluster does not cover

Message Queue owns the subject grammar and the message contract every interface above is written in. Read it before adding a subject; this cluster says which subjects a report uses, not what a well-formed one looks like.

Compute job lifecycle owns the grid's own states and vocabulary — batches, workunits, results, hosts. This cluster starts at the boundary of that: what a report run sends and what it must do with what comes back.

Market Data Requirements and Resolution owns how a logical need for market data becomes concrete items. Pre-processing consumes that resolution; it does not define it.

Data-Oriented Design in ORE Studio supplies the criteria the data characteristics page applies. It judges the shapes; it does not describe a report.

Data storage owns where durable data lives and which interface reaches each store. This cluster names the objects a run writes and does not choose the store.

ORE Model Configuration and its neighbours own what the engine's configuration documents mean. Pre-processing produces them; what a curve configuration or a pricing configuration should contain is decided there.

4. See also

  • Cuts — the fixed world a run reads: the deals, the market data and the reference data a report run must carry if it is to be reproducible.

Emacs 29.3 (Org mode 9.6.15)