Closed moiri closed 5 years ago
The current config format is as follows:
<app name="app_name" log="log_conf_path">
<net1 profiler="off" ...>
...
</net1>
...
</app>
With json this would be mapped and extended as follows:
{
"name": "app_name",
"log": "log_conf_path",
"nets": {
"_default": {
"profiler": false
},
"box_name1": {
"_default": {
"config": {}
},
"net_name1": {
"_default": {
"config": "path to config file of net_id1"
},
"net_id1": null,
"net_id2": {
"profiler": true,
"config": null
}
},
"net_name2": null
},
"box_name2": {
"_default": {
"profiler": true,
"config": {}
}
}
}
}
Some notes:
all nets
> box_name
> net_name
> net_id
which allows to address each instance but also allows to use the same configuration for all instances at a certain hierarchy level (with the _default
key). This covers moiri/streamix-rts#14.config
of each net instance can have three types:
null
: use the default configuration of the parent hierarchyobject
: the list of net configuration optionsstring
: a path to a json configuration file holding the list net configuration options. This covers moiri/streamix-rts#7profiler
) are separated from fields that are only valid for a specific box. The latter are defined in the config
key.implemented with 9c7df00
Adapted other projects accordingly:
smx_src_rand
smx_prc_worker
smx_snk_mongo
Instead of XML use JSON.
This will simplify work with a web backend.