Service application facet

Table of Contents

Summary

The service application facet is the runnable-process projection of a domain service: the application class, its host, the configuration options and parser, and the main() entry point that ores.codegen generates under --address ores.cpp.service-app. It turns a domain component into a deployable NATS service with consistent start-up, configuration and logging, so every service in the fleet is wired the same way.

Detail

The facet sits at the top of the entity lifecycle's service side. It emits the scaffolding a domain service needs to run:

  • Application — the service class that owns the domain handlers and the NATS connection.
  • Host — the process host that wires the application into the runtime (logging, lifecycle, signals).
  • Configuration — the options struct and its command-line / file parser.
  • Entry point — the main() that constructs and runs the host.

The business logic is hand-written; the facet generates the boilerplate around it. Read the template for the authoritative output rather than reproducing it here.

See also

Emacs 29.3 (Org mode 9.6.15)