-
Notifications
You must be signed in to change notification settings - Fork 20
Mapping
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
.
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.
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 tofoo
, - the node whose id is equal to
my-operator
should run on the daemon whose name is equal tobar
, - the node whose id is equal to
my-sink
should run on the daemon whose name is equal tobaz
.
The ids are given to the nodes in the data flow descriptor. The names are given to the daemons in their respective configuration file.
-
Descriptor
- Data flow descriptor
-
Node descriptor
- (optional) Vars
- (optional) Configuration
- Inputs and/or Outputs
- URI
- Composite Operator
-
Node Implementation
-
Advanced