Skip to content
ark

Quick start

Run Timers to check that the application can load plugins and enter the module lifecycle. It uses ark_utility_plugin and timers_plugin; it does not require Consul, Etcd, Kafka, OSS, a database service or Excel configuration generation.

Build the application and plugins

Complete Install and build first. The commands below use its Release output directory, app-build/bin/, from the repository root. Keep the executable and plugin files from the same build together.

Prepare a runtime directory

Stage binaries and the application manifest in a runtime directory separate from source configuration.

mkdir -p run/timers/bin run/timers/conf
cp -R app-build/bin/. run/timers/bin/
cp config/timers.app.toml run/timers/conf/
New-Item -ItemType Directory -Path run/timers/bin, run/timers/conf -Force | Out-Null
Copy-Item app-build/bin/* run/timers/bin/ -Recurse -Force
Copy-Item config/timers.app.toml run/timers/conf/

The required runtime files are:

  • run/timers/ — Isolated Timers runtime
    • bin/ — app + ark_utility_plugin + timers_plugin from the same build
      • …
    • conf/ — TOML application configuration
      • timers.app.toml — Select Utility and Timers

The copy includes other build artifacts; timers.app.toml selects only the two named libraries. No separate timers.conf or resource/ is required.

Start Timers

Run from run/timers/: the manifest’s bin/ and conf/ paths are relative to the working directory.

cd run/timers
./bin/app --busid=1.0.1.1 --name=timers \
  --app_conf=conf/timers.app.toml
cd run/timers
.\bin\app.exe --busid=1.0.1.1 --name=timers `
  --app_conf=conf/timers.app.toml

Debug builds use app_d or app_d.exe and plugin filenames with _d before the platform suffix. Use the complete Debug output in its own runtime directory; the TOML plugin names stay unchanged.

Check the result

The console should show a timers_module log with PostInit. The sample registers a timer that emits timer log at ten-second intervals, five times. Omitted logger settings use console INFO output. Add [logging] to this same manifest to enable file output; see logging settings.

Stop with Ctrl+C on macOS/Linux, or enter exit in the Windows application console. Timers should log PreShut, then Shut.

Continue with your application

  • Create a module and Create a plugin explain how to register behavior.
  • Application launcher explains Bus identity, plugin selection and configuration paths. Applications that load Kernel data need resource/meta/entity_schema.json.
  • Configuration tools explains the native CSV/XLSX/JSON exporter. Timers needs neither the exporter nor business resources.
  • Network regression tests verify network behavior independently. Applications that select Consul or database plugins need those services and their own settings.

Read the typed sample construction

examples/timers, examples/module_lifecycle and examples/entity_operations use module_base<interface_type> and plugin_base<derived_type>. The sample classes remain in their plugin’s adjacent headers. They do not introduce a separate service interface and retain their capability-specific module RTTI keys. Timers now inherits module_base<module, timer_module, guid_module> to declare its actual required Utility providers; the other two samples retain module_base<module>. Dependency validation precedes startup hooks, and each startup phase initializes providers first. See startup dependencies and rebuild requirements.

timers_plugin.hpp, for example, declares a factory returning std::unique_ptr<timers_module>; timers_module.cpp defines it. The plugin registers that owned result and explicitly exports DllEntryPlugin / DllExitPlugin, including the existing logger initialization. Successful registration still requires explicit unregister/delete during uninstall().

Sample Update registration Runtime dependencies
Timers module_update::enabled, preserving its update() override Utility plugin; no external business metadata
module_lifecycle module_update::disabled, preserving its inherited default update() Kernel and Utility plugins; business metadata under resource/meta/
entity_operations module_update::disabled, preserving its inherited default update() Kernel and Utility plugins; bundled small example metadata

Timers and module_lifecycle retain their business bodies; entity operations now starts a lightweight data demonstration, with its old timed workload moved to an explicit benchmark. Capability names change module RTTI keys and manifest library stems. module_lifecycle’s metadata is external business data; this construction change does not generate or convert it. When applications, examples, configuration and core tests are enabled with the required Kernel/Utility plugins, run cmake --build app-build --target check-typed-examples -j2 to load the actual Timers/module_lifecycle/entity_operations DSOs, execute five updates on the manager thread and verify ordered startup and shutdown. This test supplies a small test dataset for module_lifecycle; it does not validate an application’s exported business dataset.

Use installed outputs

After installing, replace app-build/bin/ in the copy commands with the selected prefix’s bin/, and copy configuration samples from <prefix>/share/ark/config/. The install tree itself is not the Timers working directory: prepare run/timers/conf/ as above, then launch from run/timers/. A relocated package still needs compatible external runtime libraries. Installed-consumer checks verify CMake/link consumption; they do not establish application deployment acceptance.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close