ores.ore.service

Table of Contents

1. Diagram

ores.ore.service component diagram

Figure 1: ores.ore.service

2. Summary

ores.ore.service is the runnable host of the component. It reads its configuration, opens the NATS and database connections, subscribes the ORE import subjects, and runs the service loop.

The import handlers are the part's substance: the worklist handler that stages an uploaded directory, the execute handler that plans and saves the documents into the trading and reference data model, the rollback handler, and the report package handler that assembles an ORE run's inputs.

3. Inputs

  • Configuration: NATS, database, logging, the HTTP base URL and the work directory.
  • NATS requests on workflow.v1.ops.ore_import, ore.v1.ops.ore_import_execute and ore.v1.ops.ore_import_rollback, and the reporting package preparation.
  • The uploaded import tarball, fetched from object storage into the work directory.

4. Outputs

  • Imported and rolled-back rows in the trading and reference data model.
  • NATS responses carrying the import plan, the per-item outcome and any errors.
  • A running service process.

5. Entry points

  • src/main.cpp — process entry point.
  • src/app/ — the application and its host.
  • src/config/ — the command line and environment parser.
  • src/messaging/ — the registrar and the import, execute, rollback and report package handlers.

6. Dependencies

  • ores.service, ores.nats, ores.database, ores.utility, ores.telemetry.core and ores.eventing.core — linked publicly.
  • ores.ore.core, ores.ore.api, ores.storage, ores.workflow.api, ores.iam.client, ores.refdata.api, ores.trading.api, ores.reporting.api and Boost — linked privately.

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. Options

The options this service takes beyond logging, NATS and the database. Codegen writes the member, its wire field, its command-line declaration and its assignment from each entry.

8.1. http_base_url

Base URL of the storage HTTP API, e.g. "http://localhost:8080".

Used by storage_transfer to download ORE import tarballs.

8.2. work_dir

Root directory for per-import working directories.

Each import unpacks its tarball into work_dir/{request_id}/. Default: ../var/ore-service/work (relative to the binary directory, resolves to publish/var/ore-service/work/ in the build tree).

9. See also

10. Test dependencies

The suites link what the profile cannot know about.

target_link_libraries(${lib_target_name}
    PUBLIC
        ores.service.lib
        ores.nats.lib
        ores.database.lib
        ores.utility.lib
        ores.telemetry.core.lib
        ores.eventing.core.lib
    PRIVATE
        ores.ore.core.lib
        ores.ore.api.lib
        ores.storage.core.lib
        ores.workflow.api.lib
        ores.iam.client.lib
        ores.refdata.api.lib
        ores.refdata.core.lib
        ores.trading.api.lib
        ores.reporting.api.lib
        Boost::boost)
target_link_libraries(${tests_target_name}
    PRIVATE
        ${lib_target_name}
        ores.utility.lib
        ores.testing.lib
        ores.logging.lib
        Catch2::Catch2
        faker-cxx::faker-cxx
        Threads::Threads)

Emacs 29.3 (Org mode 9.6.15)