humdek-unibe-ch / smx-core-rts

The runtime system (RTS) library for the coordination language Streamix.
Mozilla Public License 2.0
0 stars 0 forks source link

Change Config Files to JSON #10

Closed moiri closed 5 years ago

moiri commented 5 years ago

Instead of XML use JSON.

This will simplify work with a web backend.

moiri commented 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:

moiri commented 5 years ago

implemented with 9c7df00

moiri commented 5 years ago

Adapted other projects accordingly: