Support UAPI-style configuration specification #130
doganulus
started this conversation in
Ideas and new features
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Linux User API Working Group has a Configuration Files Specification for modern applications. This specification establishes where configuration files should be looked for, in which order, and how precedence, masking, extensions, and overrides work. It is implemented for
systemd
, the flagship example of this configuration style.This discussion is about how this configuration style can be applied to the Zenoh project. It definitely would bring many benefits to handling configuration complexity across the ecosystem, yet some deviations from the specification seem necessary.
Pros:
systemd
.Deviations from the specification:
libeconf
for the specification is written in C and supports an INI-like format. Zenoh and the robotics community use more complex configuration formats like JSON and YAML. Therefore, applying the concept to these formats would require an additional implementation effort.yml
>yaml
>json
>json5
. This is non-standard, as far as I know.However, let's look at how it may look once implemented. Assume a configuration hierarchy is defined for Zenoh as follows (lowest precedence is first):
/usr/local/zenoh/config/
/run/zenoh/
/etc/zenoh/
$HOME/.config/zenoh/
Example 1:
/usr/local/zenoh/config/zenoh.json
(default router configuration is here)/etc/zenoh/zenoh.d/01-plugin-rest.json
(this merges with the default)/etc/zenoh/zenoh.d/02-namespace-my_app.yml
(this merges with the previous and uses the exact mechanism to configure my custom app via the object at the keyapps.namespace.my_app
)Example 2:
/etc/zenoh/zenoh.json
(masking/usr/local/zenoh/share/zenoh.json
)$HOME/.config/zenoh.d/my_local_override.yml
(users add or overrides)Beta Was this translation helpful? Give feedback.
All reactions