Configurable random run-dir path

Consider adding a configuration option to weskit.yaml that allows to:

  • Set the base path of the random directories, e.g.
run_dir:
  type: api

This may then replace the current require_workdir_tag, i.e. with type: api the admin would configure that the run-dir tag shall be usable by the client.

Or

run_dir:
  type: uuid
  subdir: data

This would create UUID run directories (type) in $WESKIT_DATA/data. This was planned to allow for abstract paths to which the result data is written, instead of OTP pre-assigning directories.

For the UUIDs, one may also consider defining the length of the prefix from the UUID used for the first level. Currently, it is 4 resulting in up to 16^4 directories in WESKIT_DATA, which is 65535. This is MUCH too large. Probably a prefix length of 2 (256 directories) would be sufficient. E.g.

run_dir
  type: uuid
  subdir: .
  level1: 4

to re-create the current behaviour, in which WESKIT_DATA/uuid[0:3]/uuid paths are created.

Later (not now) this could be extended to e.g. distribute UUID dirs to multiple shares mounted into the WESKIT_DATA directory. This was (once) thought as a way to have alternative mounts, in case of storage failure on some mounts (as happened for OTP).

Edited by Philip Reiner Kensche