Skip to content

Mapping

J-Loudet edited this page Jan 2, 2023 · 2 revisions

To control on which daemons the different parts of a data flow run, Zenoh-Flow leverages a special section in the data flow descriptor: the mapping.

No mapping: single, randomly-selected, daemon

If the mapping section is absent, Zenoh-Flow will default to running all the nodes on one daemon. This daemon is randomly selected if several are available.

Mapping

At this stage of the development of Zenoh-Flow, to deploy a data flow, each daemon must have access to the shared library or scripts. In other words, the uri field in the descriptor file of the node must point to an accessible location on the file system where the daemon is running.

The same holds for the descriptor fields pointing to the descriptors.

Hence, if a data flow should be deployed on several daemons, the shared library or scripts must be uploaded on the device where the daemons are running and the different paths updated accordingly: (i) the path of the descriptors and, in each descriptor, (ii) the path of the implementation of the node. Note that, a daemon only needs access to the nodes it runs.

Assuming that the paths are correct and the implementations present on the device, to inform Zenoh-Flow of where each node should run one needs to write a mapping.

mapping:
  my-source: foo
  my-operator: bar
  my-sink: baz

The above mapping indicates that:

  • the node whose id is equal to my-source should run on the daemon whose name is equal to foo,
  • the node whose id is equal to my-operator should run on the daemon whose name is equal to bar,
  • the node whose id is equal to my-sink should run on the daemon whose name is equal to baz.

The ids are given to the nodes in the data flow descriptor. The names are given to the daemons in their respective configuration file.

⚠️ All nodes that are absent from the mapping will run, by default, on the randomly selected daemon!.

Clone this wiki locally