ores.synthetic.core

Table of Contents

1. Diagram

ores.synthetic.core component diagram

Figure 1: ores.synthetic.core

2. Summary

ores.synthetic.core implements the server side of the synthetic data component. Each of the nine bound entities has a generated repository, mapper, entity, service, NATS handler with sub-registrar, history provider registrar, and history field mapper. messaging/registrar.cpp composes all handlers and history providers into the service host. The facet also keeps the component's original catalog and organisation generation services, which produce synthetic test data for the DQ pipeline.

3. Inputs

  • NATS request messages for entity CRUD, history, feed configuration, and feed control, decoded with the ores.synthetic.api protocol headers.
  • Database context supplied by the host (ores.synthetic.service), carrying the tenant and party scope the RLS policies enforce.

4. Outputs

  • Entity rows written to the ores_synthetic_ tables, with version history.
  • NATS responses for every registered subject.
  • Synthetic organisation hierarchies and catalogs returned to callers.

5. Entry points

  • include/ores.synthetic.core/messaging/registrar.hpp — registers all NATS handlers and history providers with the service host.
  • include/ores.synthetic.core/service/ — one service class per entity.
  • include/ores.synthetic.core/repository/ — one repository class per entity.
  • src/generators/ and src/data/ — the catalog and organisation generators.

6. Dependencies

  • ores.synthetic.api — domain types, protocol schemas, and feeds.
  • ores.eventing — change event publication.
  • ores.database — execution context and party scope.
  • 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. CMake

Its own sources sit beside the public headers, so src/ is on the private include path.

target_include_directories(${lib_target_name} PRIVATE
    ${CMAKE_CURRENT_SOURCE_DIR})

10. Test dependencies

The suites link what the profile cannot know about.

target_link_libraries(${lib_target_name}
    PUBLIC
        ores.synthetic.api.lib
        ores.trading.api.lib
        ores.nats.lib
        ores.dq.api.lib
        ores.iam.api.lib
        ores.refdata.core.lib
        ores.database.lib
    PRIVATE
        ores.history.core.lib
        ores.service.lib
        ores.utility.lib
        ores.security.lib
        faker-cxx::faker-cxx
        Boost::boost)
target_link_libraries(${tests_target_name}
    PRIVATE
        ${lib_target_name}
        ores.utility.lib
        ores.testing.lib
        ores.eventing.api.lib
        ores.eventing.core.lib
        ores.trading.core.lib
        ores.ore.core.lib
        Boost::process
        Catch2::Catch2
        faker-cxx::faker-cxx
        Threads::Threads)

Emacs 29.3 (Org mode 9.6.15)