From 8bf0e57600c2950f7f9ac710f499ff66ab4bdc97 Mon Sep 17 00:00:00 2001 From: Nagesh Mandal <106006006+NageshMandal@users.noreply.github.com> Date: Tue, 1 Apr 2025 15:41:04 +0530 Subject: [PATCH] Enhance Zenoh Integration Documentation Improve the documentation for Zenoh integration by adding detailed setup instructions, configuration examples. --- README.md | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/README.md b/README.md index 289bccec..b89f5fd2 100644 --- a/README.md +++ b/README.md @@ -311,6 +311,109 @@ turtle_twist_writer.publish(message) > You might want to use ChatGPT to write the Arrow Formatting: https://chat.openai.com/share/4eec1c6d-dbd2-46dc-b6cd-310d2895ba15 + +## Zenoh Integration for Distributed Dataflow (Experimental) + +Zenoh is a high-performance pub/sub and query protocol that unifies data in motion and at rest. In **dora-rs**, Zenoh is used for remote communication between nodes running on different machines, enabling distributed dataflow across networks. + +### What is Zenoh? + +- **Definition:** + [Zenoh](https://zenoh.io) is an open-source communication middleware offering pub/sub and query capabilities. +- **Benefits in DORA:** + - Simplifies communication between distributed nodes. + - Handles NAT traversal and inter-network communication. + - Integrates with DORA to manage remote data exchange while local communication still uses efficient shared memory. + +### Enabling Zenoh Support + +1. **Run a Zenoh Router (`zenohd`):** + Launch a Zenoh daemon to mediate communication. For example, using Docker: + + ```bash + docker run -p 7447:7447 -p 8000:8000 --name zenoh-router eclipse/zenohd:latest + + +```markdown +## Create a Zenoh Configuration File 🎛️ + +Create a file (e.g., `zenoh.json5`) with the router endpoint details: + +```json5 +{ + "connect": { + "endpoints": [ "tcp/203.0.113.10:7447" ] + } +} +``` + +--- + +## Launch DORA Daemons with Zenoh Enabled 🚀 + +On each machine, export the configuration and start the daemon: + +```bash +export ZENOH_CONFIG=/path/to/zenoh.json5 +dora daemon --coordinator-addr --machine-id +``` + +--- + +## Deploy Distributed Nodes via YAML 📄 + +Mark nodes for remote deployment using the `_unstable_deploy` key: + +```yaml +nodes: + - id: camera_node + outputs: [image] + + - id: processing_node + _unstable_deploy: + machine: robot1 + path: /home/robot/dora-nodes/processing_node + inputs: + image: camera_node/image + outputs: [result] +``` + +--- + +## Start the Coordinator and Dataflow 🏁 + +Run the coordinator on a designated machine and start the dataflow: + +```bash +dora coordinator +dora start dataflow.yml +``` + +--- + +## YAML Example for Distributed Dataflow 📘 + +```yaml +communication: + zenoh: + prefix: /my_dora_network + +nodes: + - id: camera_node + custom: + run: ./camera_driver.py + outputs: + - image + + - id: processing_node + _unstable_deploy: + machine: robot1 + path: /home/robot/dora-nodes/processing_node + inputs: + image: camera_node/image + outputs: + - result +``` ## Contributing We are passionate about supporting contributors of all levels of experience and would love to see @@ -331,3 +434,12 @@ We also have [a contributing guide](CONTRIBUTING.md). ## License This project is licensed under Apache-2.0. Check out [NOTICE.md](NOTICE.md) for more information. + +--- + +## Further Resources 📚 + +- [Zenoh Documentation](https://zenoh.io/docs/) +- [DORA Zenoh Discussion (GitHub Issue #512)](https://github.com/dora-rs/dora/issues/512) +- [Dora Autoware Localization Demo](https://github.com/dora-rs/dora-autoware-localization-demo) +```