You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fix the README format.
Signed-off-by: ChenYing Kuo <evshary@gmail.com>
* Fix some out-dated contents.
Signed-off-by: ChenYing Kuo <evshary@gmail.com>
---------
Signed-off-by: ChenYing Kuo <evshary@gmail.com>
The Eclipse Zenoh: Zero Overhead Pub/sub, Store/Query and Compute.
12
13
13
14
Zenoh (pronounce _/zeno/_) unifies data in motion, data at rest and computations. It carefully blends traditional pub/sub with geo-distributed storages, queries and computations, while retaining a level of time and space efficiency that is well beyond any of the mainstream stacks.
14
15
15
16
Check the website [zenoh.io](http://zenoh.io) and the [roadmap](https://github.com/eclipse-zenoh/roadmap) for more detailed information.
16
17
17
18
-------------------------------
19
+
18
20
## Getting Started
19
21
20
22
Zenoh is extremely easy to learn, the best place to master the fundamentals is our [getting started guide](https://zenoh.io/docs/getting-started/first-app/).
21
23
22
24
-------------------------------
25
+
23
26
## How to install it
24
27
25
28
To install the latest release of the Zenoh router (`zenohd`) and its default plugins (REST API plugin and Storages Manager plugin) you can do as follows:
26
29
27
30
### Manual installation (all platforms)
28
31
29
-
All release packages can be downloaded from:
30
-
-https://download.eclipse.org/zenoh/zenoh/latest/
32
+
All release packages can be downloaded from [https://download.eclipse.org/zenoh/zenoh/latest/](https://download.eclipse.org/zenoh/zenoh/latest/).
31
33
32
-
Each subdirectory has the name of the Rust target. See the platforms each target corresponds to on https://doc.rust-lang.org/stable/rustc/platform-support.html
34
+
Each subdirectory has the name of the Rust target. See the platforms each target corresponds to on [https://doc.rust-lang.org/stable/rustc/platform-support.html](https://doc.rust-lang.org/stable/rustc/platform-support.html).
33
35
34
36
Choose your platform and download the `.zip` file.
35
37
Unzip it where you want, and run the extracted `zenohd` binary.
@@ -53,12 +56,17 @@ Tap our brew package repository and install the `zenoh` formula:
53
56
brew tap eclipse-zenoh/homebrew-zenoh
54
57
brew install zenoh
55
58
```
59
+
56
60
Then you can start run `zenohd`.
57
61
62
+
-------------------------------
63
+
64
+
## Rust API
58
65
59
-
### Rust API
66
+
*[Docs.rs for Zenoh](https://docs.rs/zenoh/latest/zenoh/)
60
67
61
68
-------------------------------
69
+
62
70
## How to build it
63
71
64
72
> [!WARNING]
@@ -67,118 +75,117 @@ Then you can start run `zenohd`.
67
75
Install [Cargo and Rust](https://doc.rust-lang.org/cargo/getting-started/installation.html). Zenoh can be successfully compiled with Rust stable (>= 1.75.0), so no special configuration is required from your side. If you already have the Rust toolchain installed, make sure it is up-to-date with:
68
76
69
77
```bash
70
-
$ rustup update
78
+
rustup update
71
79
```
72
80
73
81
To build Zenoh, just type the following command after having followed the previous instructions:
74
82
75
83
```bash
76
-
$ cargo build --release --all-targets
84
+
cargo build --release --all-targets
77
85
```
78
86
79
87
Zenoh's router is built as `target/release/zenohd`. All the examples are built into the `target/release/examples` directory. They can all work in peer-to-peer, or interconnected via the zenoh router.
80
88
81
89
-------------------------------
82
-
## Quick tests of your build:
83
90
84
-
**Peer-to-peer tests:**
91
+
## Quick tests of your build
85
92
86
-
-**pub/sub**
87
-
- run: `./target/release/examples/z_sub`
88
-
- in another shell run: `./target/release/examples/z_put`
89
-
- the subscriber should receive the publication.
93
+
### Peer-to-peer tests
90
94
91
-
-**get/queryable**
92
-
-run: `./target/release/examples/z_queryable`
93
-
-in another shell run: `./target/release/examples/z_get`
94
-
-the queryable should display the log in its listener, and the get should receive the queryable result.
95
+
***pub/sub**
96
+
*run: `./target/release/examples/z_sub`
97
+
*in another shell run: `./target/release/examples/z_put`
98
+
*the subscriber should receive the publication.
95
99
96
-
**Routed tests:**
100
+
***get/queryable**
101
+
* run: `./target/release/examples/z_queryable`
102
+
* in another shell run: `./target/release/examples/z_get`
103
+
* the queryable should display the log in its listener, and the get should receive the queryable result.
104
+
105
+
### Routed tests
97
106
98
107
> [!NOTE]
99
108
> **Windows users**: to properly execute the commands below in PowerShell you need to escape `"` characters as `\"`.
A Zenoh configuration file can be provided via CLI to all Zenoh examples and the Zenoh router.
133
142
134
-
*`-c, --config <FILE>`: a [JSON5](https://json5.org) configuration file. [DEFAULT_CONFIG.json5](DEFAULT_CONFIG.json5) shows the schema of this file and the available options.
135
-
143
+
*`-c, --config <FILE>`: a [JSON5](https://json5.org) configuration file. [DEFAULT_CONFIG.json5](DEFAULT_CONFIG.json5) shows the schema of this file and the available options.
136
144
137
145
See other examples of Zenoh usage in [examples/](examples)
138
146
139
147
> [!NOTE]
140
148
> **Zenoh Runtime Configuration**: Starting from version 0.11.0-rc, Zenoh allows for configuring the number of worker threads and other advanced options of the runtime. For guidance on utilizing it, please refer to the [doc](https://docs.rs/zenoh-runtime/latest/zenoh_runtime/enum.ZRuntime.html).
141
149
142
150
-------------------------------
151
+
143
152
## Zenoh router command line arguments
144
-
`zenohd` accepts the following arguments:
145
153
146
-
*`--adminspace-permissions <[r|w|rw|none]>`: Configure the read and/or write permissions on the admin space. Default is read only.
147
-
*`-c, --config <FILE>`: a [JSON5](https://json5.org) configuration file. [DEFAULT_CONFIG.json5](DEFAULT_CONFIG.json5) shows the schema of this file. All properties of this configuration are optional, so you may not need such a large configuration for your use-case.
148
-
*`--cfg <KEY>:<VALUE>`: allows you to change specific parts of the configuration right after it has been constructed. VALUE must be a valid JSON5 value, and key must be a path through the configuration file, where each element is separated by a `/`. When inserting in parts of the config that are arrays, you may use indexes, or may use `+` to indicate that you want to append your value to the array. `--cfg` passed values will always override any previously existing value for their key in the configuration.
149
-
*`-l, --listen <ENDPOINT>...`: An endpoint on which this router will listen for incoming sessions.
150
-
Repeat this option to open several listeners. By default, `tcp/[::]:7447` is used. The following endpoints are currently supported:
*`-e, --connect <ENDPOINT>...`: An endpoint this router will try to connect to. Repeat this option to connect to several peers or routers.
156
-
*`--no-multicast-scouting`: By default zenohd replies to multicast scouting messages for being discovered by peers and clients.
157
-
This option disables this feature.
158
-
*`-i, --id <hex_string>`: The identifier (as an hexadecimal string - e.g.: A0B23...) that zenohd must use.
159
-
**WARNING**: this identifier must be unique in the system! If not set, a random unsigned 128bit integer will be used.
160
-
*`--no-timestamp`: By default zenohd adds a HLC-generated Timestamp to each routed Data if there isn't already one.
161
-
This option disables this feature.
162
-
*`-P, --plugin [<PLUGIN_NAME> | <PLUGIN_NAME>:<LIBRARY_PATH>]...`: A [plugin](https://zenoh.io/docs/manual/plugins/) that must be loaded. Accepted values:
163
-
- a plugin name; zenohd will search for a library named `libzenoh_plugin_<name>.so` on Unix, `libzenoh_plugin_<PLUGIN_NAME>.dylib` on MacOS or `zenoh_plugin_<PLUGIN_NAME>.dll` on Windows.
164
-
-`"<PLUGIN_NAME>:<LIBRARY_PATH>"`; the plugin will be loaded from library file at `<LIBRARY_PATH>`.
165
-
166
-
Repeat this option to load several plugins.
167
-
*`--plugin-search-dir <DIRECTORY>...`: A directory where to search for [plugins](https://zenoh.io/docs/manual/plugins/) libraries to load.
168
-
Repeat this option to specify several search directories'. By default, the plugins libraries will be searched in:
169
-
`'/usr/local/lib:/usr/lib:~/.zenoh/lib:.'`
170
-
*`--rest-http-port <rest-http-port>`: Configures the [REST plugin](https://zenoh.io/docs/manual/plugin-http/)'s HTTP port. Accepted values:
171
-
- a port number
172
-
- a string with format `<local_ip>:<port_number>` (to bind the HTTP server to a specific interface)
173
-
-`"None"` to deactivate the REST plugin
174
-
175
-
If not specified, the REST plugin will be active on any interface (`[::]`) and port `8000`.
154
+
`zenohd` accepts the following arguments:
176
155
177
-
> [!WARNING]
178
-
> The following documentation pertains to the v0.6+ API, which comes many changes to the behaviour and configuration of Zenoh.
179
-
To access the v0.5 version of the code and matching README, please go to the [0.5.0-beta.9](https://github.com/eclipse-zenoh/zenoh/tree/0.5.0-beta.9) tagged version.
156
+
*`--adminspace-permissions <[r|w|rw|none]>`: Configure the read and/or write permissions on the admin space. Default is read only.
157
+
*`-c, --config <FILE>`: a [JSON5](https://json5.org) configuration file. [DEFAULT_CONFIG.json5](DEFAULT_CONFIG.json5) shows the schema of this file. All properties of this configuration are optional, so you may not need such a large configuration for your use-case.
158
+
*`--cfg <KEY>:<VALUE>`: allows you to change specific parts of the configuration right after it has been constructed. VALUE must be a valid JSON5 value, and key must be a path through the configuration file, where each element is separated by a `/`. When inserting in parts of the config that are arrays, you may use indexes, or may use `+` to indicate that you want to append your value to the array. `--cfg` passed values will always override any previously existing value for their key in the configuration.
159
+
*`-l, --listen <ENDPOINT>...`: An endpoint on which this router will listen for incoming sessions.
160
+
Repeat this option to open several listeners. By default, `tcp/[::]:7447` is used. The following endpoints are currently supported:
*`-e, --connect <ENDPOINT>...`: An endpoint this router will try to connect to. Repeat this option to connect to several peers or routers.
166
+
*`--no-multicast-scouting`: By default zenohd replies to multicast scouting messages for being discovered by peers and clients.
167
+
This option disables this feature.
168
+
*`-i, --id <hex_string>`: The identifier (as an hexadecimal string - e.g.: A0B23...) that zenohd must use.
169
+
**WARNING**: this identifier must be unique in the system! If not set, a random unsigned 128bit integer will be used.
170
+
*`--no-timestamp`: By default zenohd adds a HLC-generated Timestamp to each routed Data if there isn't already one.
171
+
This option disables this feature.
172
+
*`-P, --plugin [<PLUGIN_NAME> | <PLUGIN_NAME>:<LIBRARY_PATH>]...`: A [plugin](https://zenoh.io/docs/manual/plugins/) that must be loaded. Accepted values:
173
+
* a plugin name; zenohd will search for a library named `libzenoh_plugin_<name>.so` on Unix, `libzenoh_plugin_<PLUGIN_NAME>.dylib` on MacOS or `zenoh_plugin_<PLUGIN_NAME>.dll` on Windows.
174
+
*`"<PLUGIN_NAME>:<LIBRARY_PATH>"`; the plugin will be loaded from library file at `<LIBRARY_PATH>`.
175
+
176
+
Repeat this option to load several plugins.
177
+
*`--plugin-search-dir <DIRECTORY>...`: A directory where to search for [plugins](https://zenoh.io/docs/manual/plugins/) libraries to load.
178
+
Repeat this option to specify several search directories'. By default, the plugins libraries will be searched in:
179
+
`'/usr/local/lib:/usr/lib:~/.zenoh/lib:.'`
180
+
*`--rest-http-port <rest-http-port>`: Configures the [REST plugin](https://zenoh.io/docs/manual/plugin-http/)'s HTTP port. Accepted values:
181
+
* a port number
182
+
* a string with format `<local_ip>:<port_number>` (to bind the HTTP server to a specific interface)
183
+
*`"None"` to deactivate the REST plugin
184
+
185
+
If not specified, the REST plugin will be active on any interface (`[::]`) and port `8000`.
180
186
181
187
-------------------------------
188
+
182
189
## Plugins
183
190
184
191
> [!WARNING]
@@ -200,6 +207,7 @@ This plugin converts GET and PUT REST requests into Zenoh gets and puts respecti
200
207
This plugin allows you to easily define storages. These will store key-value pairs they subscribed to, and send the most recent ones when queried. Check out [DEFAULT_CONFIG.json5](DEFAULT_CONFIG.json5) for info on how to configure them.
201
208
202
209
-------------------------------
210
+
203
211
## Troubleshooting
204
212
205
213
In case of troubles, please first check on [this page](https://zenoh.io/docs/getting-started/troubleshooting/) if the trouble and cause are already known.
0 commit comments