In this example, we extend the previous video replayer application into a multi-node distributed application. A distributed application is made up of multiple Fragments (C++ (holoscan::Fragment)/Python (holoscan.core.Fragment)), each of which may run on its own node.
In the distributed case we will:
These two fragments will be combined into a distributed application such that the display of the video frames could occur on a separate node from the node where the data is read.
The example source code and run instructions can be found in the examples directory on GitHub, or under /opt/nvidia/holoscan/examples in the NGC container and the Debian package, alongside their executables.
Here is the diagram of the operators and workflow used in this example.
This is the same workflow as the single fragment video replayer. Each operator is assigned to a separate fragment and there is now a network connection between the fragments.
Distributed applications define fragments explicitly to isolate the different units of work that could be distributed to different nodes. In this example:
Fragment:
holoscan::Fragment::from_config (C++) or holoscan.core.Fragment.kwargs (Python).This particular distributed application only has one operator per fragment, so the operators were added via add_operator (C++ (holoscan::Fragment::add_operator)/Python (holoscan.core.Fragment.add_operator)). In general, each fragment may have multiple operators and connections between operators within a fragment would be made using add_flow() (C++ (holoscan::Fragment::add_flow)/Python (holoscan.core.Fragment.add_flow)) method within the fragment’s compute() (C++ (holoscan::Operator::compute)/Python (holoscan.core.Operator.compute)) method.
Running the application should bring up video playback of the video referenced in the YAML file.

Instructions for running the distributed application involve calling the application from the “driver” node as well as from any worker nodes. For details, see the application run instructions in the examples directory on GitHub, or under /opt/nvidia/holoscan/examples/video_replayer_distributed in the NGC container and the Debian package.
Refer to UCX Network Interface Selection when running a distributed application across multiple nodes.