eclipse-zenoh-flow/zenoh-flow

Feedback from AutoCore team

moelang opened this issue · 3 comments

Hello zenoh-flow team,

We use zenoh-flow in our project, this framework is great and meets our expectations!

In the process of project development, we have met some scenarios and can't find a suitable solution.

Feedback is here and we look forward to discussing suitable solutions with you.

  1. In graph node configuration, the current state is that a key can only have one value:
configuration:
  key1: value1
  key2: value2
  key3: value3

But we need more fields to describe a key:

configuration:
  - id: key1
    foo: value
    bar: value
    baz: value
  - id: key2
    foo: value
    bar: value
    baz: value

or:

configuration:
  key1: 
    foo: value
    bar: value
    baz: value
  key2:
    foo: value
    bar: value
    baz: value
  1. Development path of dynamic library are different with deployment path, we expect to change the default global graph args when runtime starting:
args:
  release_path: /opt/release/bin
  default_input_id: Input
  default_output_id: Output
  default_config_foo: foo
operators:
  - id : MyOperator
    uri: file://{{release_path}}/libmy_operator.so
    inputs:
      - id: {{default_input_id}}
        type: i32
    outputs:
      - id: {{default_output_id}}
        type: i32
    configuration:
      config_foo: {{default_config_foo}}

and launch with development path:

$ runtime --graph-file demo.yaml --runtime foo --release_path './build/bin'

More feedback will be updated after the demo test, looking forward to your reply:)

Hi @moelang, we are glad to hear that Zenoh Flow is meeting your expectations and thank you for your feedback!

Speaking of feedback, here is our take on what you pointed out:

But we need more fields to describe a key:

configuration:
 - id: key1
   foo: value
   bar: value
   baz: value
 - id: key2
   foo: value
   bar: value
   baz: value

See @gabrik’s answer below, the changes have been merged!


Development path of dynamic library are different with deployment path, we expect to change the default global graph args when runtime starting:

args:
  release_path: /opt/release/bin
  default_input_id: Input
  default_output_id: Output
  default_config_foo: foo
operators:
  - id : MyOperator
    uri: file://{{release_path}}/libmy_operator.so
    inputs:
      - id: {{default_input_id}}
        type: i32
    outputs:
      - id: {{default_output_id}}
        type: i32
    configuration:
      config_foo: {{default_config_foo}}

We propose a slightly different approach: instead of having the args in the same YAML file, we suggest to have in a separate "configuration" file.
With what we propose you would:

  1. Create the configuration file:
    # We assume this is file ~/dataflow-config.yaml
    release_path: /opt/release/bin
    default_input_id: Input
    default_output_id: Output
    default_config_foo: foo
  2. Start the dataflow providing this configuration:
    runtime --graph-file demo.yaml --runtime foo --configuration ~/dataflow-config.yaml
  3. If you want to replace/provide some arguments with the command line, you would do so:
    runtime --graph-file demo.yaml --runtime foo --configuration ~/dataflow-config.yaml --arg release_path='./build/bin'

Would these changes satisfy your team?

Hi @moelang, first thank you for your useful feedbacks.

Regarding the 1st point, we explored serde_json::Value and seems that it both covers your use-case and it is easy to use.
So we decided to implement the support for it (see PR #40).
This means that the Node API will break and that we need to adapt also the C++ API.

@gabrik @J-Loudet Thanks, very useful. I understand your design.