ores.synthetic.service
Table of Contents
2. Summary
ores.synthetic.service is the NATS service entrypoint for the synthetic
data domain. It reads configuration, opens the NATS connection, and runs the
event loop. Composition happens in two places: registrar.cpp registers the
entity handlers and history providers from ores.synthetic.core, and the
per-entity event registrars in messaging/ wire the DB-notify to NATS
publish chain for each changed event. The feed control plane (feed
configuration, feed start and stop, folder feed control, IR curve preview,
and simulation handlers) also lives here. One per-kind
registry, feed_kind_registry, carries what the control plane needs to know
about an asset class — its factory kind, its config read permission, its
config-row loader, its build-input resolver and its simulate payload — so no handler branches on a kind.
3. Inputs
- Configuration file: NATS server URL and environment settings.
- NATS request messages for entity CRUD, feed configuration and control, simulation, and preview.
4. Outputs
- A running NATS service handling all synthetic data subjects.
- NATS response messages returned to callers.
- Structured logs via
ores.logging.
5. Entry points
src/main.cpp— process entry point.src/app/— application bootstrap and dependency injection.src/feed_kind_registry.hpp— the per-kind registry.src/registrar.cpp— handler and history provider composition.src/messaging/— per-entity event registrars.
6. Dependencies
ores.synthetic.core— all entity handlers and services.ores.synthetic.api— shared protocol types and feeds.ores.logging— structured logging infrastructure.nats.c— NATS client for connection management.
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. run_seed
The seed every random stream of the run is keyed by.
One seed reproduces a run: the same feeds tick at the same times.
8.2. market_speed
The simulated seconds one unit of market time spans.
One number for the run: every feed's prices step by it, so spot and curve feeds live in one simulated world. The default steps a curve at one tick a minute by a calendar day.
9. See also
- ores.synthetic.core — repositories, services, and NATS handlers.
10. Test dependencies
The suites link what the profile cannot know about.
target_link_libraries(${lib_target_name}
PUBLIC
ores.service.lib
ores.security.lib
ores.synthetic.core.lib
ores.analytics.quant.lib
ores.marketdata.api.lib
ores.marketdata.client.lib
ores.marketdata.core.lib
ores.iam.client.lib
ores.iam.core.lib
ores.refdata.core.lib
ores.nats.lib
ores.database.lib
ores.utility.lib
ores.telemetry.core.lib
ores.eventing.core.lib)
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)
