Browse Source

Enhance Zenoh Integration Documentation (#935)

Improve the documentation for Zenoh integration by adding detailed setup
instructions, configuration examples.
tags/v0.3.11-rc1
Enzo Le Van GitHub 9 months ago
parent
commit
ced06a9b54
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 111 additions and 0 deletions
  1. +111
    -0
      README.md

+ 111
- 0
README.md View File

@@ -311,6 +311,108 @@ 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 <COORD_IP> --machine-id <MACHINE_NAME>
```

---

## 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: {}

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 +433,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)
```

Loading…
Cancel
Save