ores.refdata.core

Table of Contents

1. Diagram

ores.refdata.core component diagram

Figure 1: ores.refdata.core

2. Summary

ores.refdata.core manages the reference-data domain in ORE Studio: over 150 domain types covering currencies, countries, counterparties, books, business units, business centres, and trading structure entities. It provides temporal ORM repositories, domain services, NATS message handlers in the 0x3000–0x3FFF range, CSV export for selected types, and synthetic-data generators. Reference data is consumed by all other domain components (trading, assets, IAM) and drives UI drop-downs and validation.

3. Inputs

  • NATS request messages from UI clients and peer services (query/create/update for currencies, counterparties, books, etc.) in the 0x3000–0x3FFF range.
  • PostgreSQL connections to ores_refdata_* tables with temporal versioning.
  • DQ population events for bulk reference-data loads.

4. Outputs

  • Reference-data records persisted to the ores_refdata schema with full temporal history (valid_from / valid_to).
  • NATS response messages returned to callers.
  • CSV exports of selected entity types (e.g., currencies).

5. Entry points

  • include/ores.refdata.core/ores.refdata.core.hpp — aggregate include.
  • include/ores.refdata.core/messaging/registrar.hpp — registers all NATS handlers with the service host, including a currency history_provider (pilot) on ores.history.core's generic history.v1.get subject — see src/messaging/registrar.cpp for the wiring. The provider receives the same fully-scoped database::context (tenant, party, roles) make_request_context() resolves for any other subject — no bespoke context threading needed.
  • include/ores.refdata.core/service/ — per-entity service headers.

6. Dependencies

  • ores.refdata.api — shared domain types and NATS protocol schemas.
  • ores.dq — ORM base classes and data-quality infrastructure.
  • ores.iam.core — identity and authorisation context.
  • ores.history.core — generic entity-history dispatch: registrar.cpp registers a currency history_provider and subscribes the shared history.v1.get subject alongside currency's existing (still live) per-entity history subject.
  • fort — formatted table output.
  • soci — SQL ORM for PostgreSQL persistence.
  • nats.c — NATS messaging client.

7. Build dependencies

What the shared profile cannot know, declared here rather than hand-edited into the generated build file. Each block is spliced into its generated file after the profile's baseline.

8. See also

9. Test dependencies

The suites link what the profile cannot know about.

target_link_libraries(${lib_target_name}
    PUBLIC
        ores.refdata.api.lib
        ores.database.lib
        ores.nats.lib
        ores.diff.lib
    PRIVATE
        ores.dq.api.lib
        ores.history.core.lib
        ores.service.lib
        pugixml::pugixml
        ores.variability.api.lib
        ores.variability.core.lib
        ores.analytics.quant.lib
        ores.platform.lib
        ores.utility.lib
        ores.security.lib
        faker-cxx::faker-cxx
        libfort::fort)
target_link_libraries(${tests_target_name}
    PRIVATE
        ${lib_target_name}
        ores.refdata.service.lib
        ores.history.core.lib
        ores.iam.api.lib
        ores.iam.core.lib
        ores.inbox.api.lib
        ores.inbox.core.lib
        ores.telemetry.core.lib
        ores.utility.lib
        ores.platform.lib
        ores.variability.api.lib
        ores.eventing.api.lib
        ores.eventing.core.lib
        ores.nats.lib
        ores.testing.lib
        ores.eventing.api.lib
        ores.eventing.core.lib
        ores.nats.lib
        Catch2::Catch2
        faker-cxx::faker-cxx
        Threads::Threads)

Emacs 29.3 (Org mode 9.6.15)