Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/brettviren/cogs

Configuration object generation system
https://github.com/brettviren/cogs

codegen configuration jsonnet model schema

Last synced: about 1 month ago
JSON representation

Configuration object generation system

Awesome Lists containing this project

README

        

#+title: cogs ⚙ configuration object generation system

This package provides the core services and facilities to define,
produce and deliver configuration information to applications in a
flexible and coordinated manner. The core of cogs consists of the
following elements:

- object schema :: using [[https://brettviren.github.io/moo/][moo]], cogs provides an abstract object schema
definition language which may compile to validating or generating
schema.

- codegen :: again using moo, cogs provides code generation to produce
C++/Python classes matching object schema.

- services :: cogs provides services for an application to receive a
sequence of configuration object in a manner that allows easy
dispatch to application internals. The services follow an abstract
interface to allow different implementations to be swapped without
application changes. File based services are included and services
using ZeroMQ or gRPC may be found in corresponding ~cogs-*~ packages.

- components :: applications may simplify dispatch of configuration to
components by using cogs mixin classes which handle the
deserialization of configuration objects to appropriate native
(generated) types.

- exceptions :: cogs follows an exception based error handling policy
and uses [[https://github.com/DUNE-DAQ/ers][ERS]] to report issues and logging.

In C++ a configuration object is an instance of a ~cogs::object~ which
is a [[https://github.com/nlohmann/json][nlohmann::json]] object.

* Demo

See the [[file:demo/README.org][demo]] for an example package that uses cogs.

* Roadmap

Near term

- [X] initial package and build and install
- [X] hook in ERS and ~nlohmann::json~
- [X] abstract configuration stream class
- [X] simple JSON file stream implementations
- [X] configurable base hierarchy
- [X] port demo application and schema from moo/moc
- [X] +port demo ~Makefile~ to ~wscript~+ use generate.sh for codegen but o.w. build
- [X] user documentation: https://brettviren.github.io/cogs/demo.html

Longer term

- [ ] understand what CCM message passing will be (gRPC? Cap'N Proto? ZeroMQ?)
- [ ] develop a ~cogs::Stream~ to support it
- [ ] integrate use of cogs into appfmk