Skip to content

Commit 7a47445

Browse files
authored
docs: format and add a link to ZRuntime config (#1000)
* docs: format and add a link to ZRuntime config * docs: format and remove the tx thread option in DEFAULT_CONFIG
1 parent 1c53818 commit 7a47445

File tree

2 files changed

+42
-41
lines changed

2 files changed

+42
-41
lines changed

DEFAULT_CONFIG.json5

+21-24
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020
/// Which endpoints to connect to. E.g. tcp/localhost:7447.
2121
/// By configuring the endpoints, it is possible to tell zenoh which router/peer to connect to at startup.
22-
/// For TCP/UDP on Linux, it is possible additionally specify the interface to be connected to:
23-
/// E.g. tcp/192.168.0.1:7447#iface=eth0, for connect only if the IP address is reachable via the interface eth0
22+
/// For TCP/UDP on Linux, it is possible additionally specify the interface to be connected to:
23+
/// E.g. tcp/192.168.0.1:7447#iface=eth0, for connect only if the IP address is reachable via the interface eth0
2424
connect: {
2525
/// timeout waiting for all endpoints connected (0: no retry, -1: infinite timeout)
2626
/// Accepts a single value or different values for router, peer and client.
@@ -30,16 +30,16 @@
3030
// "<proto>/<address>"
3131
],
3232

33-
/// Global connect configuration,
33+
/// Global connect configuration,
3434
/// Accepts a single value or different values for router, peer and client.
3535
/// The configuration can also be specified for the separate endpoint
3636
/// it will override the global one
3737
/// E.g. tcp/192.168.0.1:7447#retry_period_init_ms=20000;retry_period_max_ms=10000"
38-
38+
3939
/// exit from application, if timeout exceed
4040
exit_on_failure: { router: false, peer: false, client: true },
41-
/// connect establishing retry configuration
42-
retry: {
41+
/// connect establishing retry configuration
42+
retry: {
4343
/// intial wait timeout until next connect try
4444
period_init_ms: 1000,
4545
/// maximum wait timeout until next connect try
@@ -52,7 +52,7 @@
5252
/// Which endpoints to listen on. E.g. tcp/localhost:7447.
5353
/// By configuring the endpoints, it is possible to tell zenoh which are the endpoints that other routers,
5454
/// peers, or client can use to establish a zenoh session.
55-
/// For TCP/UDP on Linux, it is possible additionally specify the interface to be listened to:
55+
/// For TCP/UDP on Linux, it is possible additionally specify the interface to be listened to:
5656
/// E.g. tcp/0.0.0.0:7447#iface=eth0, for listen connection only on eth0
5757
listen: {
5858
/// timeout waiting for all listen endpoints (0: no retry, -1: infinite timeout)
@@ -63,16 +63,16 @@
6363
// "<proto>/<address>"
6464
],
6565

66-
/// Global listen configuration,
66+
/// Global listen configuration,
6767
/// Accepts a single value or different values for router, peer and client.
6868
/// The configuration can also be specified for the separate endpoint
6969
/// it will override the global one
7070
/// E.g. tcp/192.168.0.1:7447#exit_on_failure=false;retry_period_max_ms=1000"
71-
71+
7272
/// exit from application, if timeout exceed
7373
exit_on_failure: true,
74-
/// listen retry configuration
75-
retry: {
74+
/// listen retry configuration
75+
retry: {
7676
/// intial wait timeout until next try
7777
period_init_ms: 1000,
7878
/// maximum wait timeout until next try
@@ -171,19 +171,19 @@
171171
// flow: "egress",
172172
// /// A list of downsampling rules: key_expression and the maximum frequency in Hertz
173173
// rules: [
174-
// { key_expr: "demo/example/zenoh-rs-pub", freq: 0.1 },
174+
// { key_expr: "demo/example/zenoh-rs-pub", freq: 0.1 },
175175
// ],
176176
// },
177177
// ],
178178

179-
// /// configure access control (ACL) rules
179+
// /// configure access control (ACL) rules
180180
// access_control: {
181181
// ///[true/false] acl will be activated only if this is set to true
182182
// "enabled": false,
183183
// ///[deny/allow] default permission is deny (even if this is left empty or not specified)
184184
// "default_permission": "deny",
185185
// ///rule set for permissions allowing or denying access to key-expressions
186-
// "rules":
186+
// "rules":
187187
// [
188188
// {
189189
// "actions": [
@@ -216,7 +216,7 @@
216216
/// This option does not make LowLatency transport mandatory, the actual implementation of transport
217217
/// used will depend on Establish procedure and other party's settings
218218
///
219-
/// NOTE: Currently, the LowLatency transport doesn't preserve QoS prioritization.
219+
/// NOTE: Currently, the LowLatency transport doesn't preserve QoS prioritization.
220220
/// NOTE: Due to the note above, 'lowlatency' is incompatible with 'qos' option, so in order to
221221
/// enable 'lowlatency' you need to explicitly disable 'qos'.
222222
lowlatency: false,
@@ -225,19 +225,19 @@
225225
enabled: true,
226226
},
227227
/// Enables compression on unicast communications.
228-
/// Compression capabilities are negotiated during session establishment.
228+
/// Compression capabilities are negotiated during session establishment.
229229
/// If both Zenoh nodes support compression, then compression is activated.
230230
compression: {
231231
enabled: false,
232232
},
233-
},
233+
},
234234
multicast: {
235-
/// Enables QoS on multicast communication.
235+
/// Enables QoS on multicast communication.
236236
/// Default to false for Zenoh-to-Zenoh-Pico out-of-the-box compatibility.
237237
qos: {
238238
enabled: false,
239239
},
240-
/// Enables compression on multicast communication.
240+
/// Enables compression on multicast communication.
241241
/// Default to false for Zenoh-to-Zenoh-Pico out-of-the-box compatibility.
242242
compression: {
243243
enabled: false,
@@ -261,7 +261,7 @@
261261
/// messages will be sent at the configured time interval.
262262
/// NOTE: In order to consider eventual packet loss and transmission latency and jitter,
263263
/// set the actual keep_alive interval to one fourth of the lease time: i.e. send
264-
/// 4 keep_alive messages in a lease period. Changing the lease time will have the
264+
/// 4 keep_alive messages in a lease period. Changing the lease time will have the
265265
/// keep_alive messages sent more or less often.
266266
/// This is in-line with the ITU-T G.8013/Y.1731 specification on continous connectivity
267267
/// check which considers a link as failed when no messages are received in 3.5 times the
@@ -299,9 +299,6 @@
299299
/// Higher values lead to a more aggressive batching but it will introduce additional latency.
300300
backoff: 100,
301301
},
302-
// Number of threads dedicated to transmission
303-
// By default, the number of threads is calculated as follows: 1 + ((#cores - 1) / 4)
304-
// threads: 4,
305302
},
306303
/// Configure the zenoh RX parameters of a link
307304
rx: {
@@ -378,7 +375,7 @@
378375
///
379376
/// Plugins configurations
380377
///
381-
//
378+
//
382379
// plugins_loading: {
383380
// // Enable plugins loading.
384381
// enabled: false,

README.md

+21-17
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ To install the latest release of the Zenoh router (`zenohd`) and its default plu
2626

2727
### Manual installation (all platforms)
2828

29-
All release packages can be downloaded from:
30-
- https://download.eclipse.org/zenoh/zenoh/latest/
29+
All release packages can be downloaded from:
30+
- https://download.eclipse.org/zenoh/zenoh/latest/
3131

3232
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
3333

34-
Choose your platform and download the `.zip` file.
34+
Choose your platform and download the `.zip` file.
3535
Unzip it where you want, and run the extracted `zenohd` binary.
3636

3737
### Linux Debian
@@ -99,32 +99,32 @@ Zenoh's router is built as `target/release/zenohd`. All the examples are built i
9999
> **Windows users**: to properly execute the commands below in PowerShell you need to escape `"` characters as `\"`.
100100
101101
- **put/store/get**
102-
- run the Zenoh router with a memory storage:
102+
- run the Zenoh router with a memory storage:
103103
`./target/release/zenohd --cfg='plugins/storage_manager/storages/demo:{key_expr:"demo/example/**",volume:"memory"}'`
104104
- in another shell run: `./target/release/examples/z_put`
105105
- then run `./target/release/examples/z_get`
106106
- the get should receive the stored publication.
107107

108108
- **REST API using `curl` tool**
109-
- run the Zenoh router with a memory storage:
109+
- run the Zenoh router with a memory storage:
110110
`./target/release/zenohd --cfg='plugins/storage_manager/storages/demo:{key_expr:"demo/example/**",volume:"memory"}'`
111-
- in another shell, do a publication via the REST API:
111+
- in another shell, do a publication via the REST API:
112112
`curl -X PUT -d '"Hello World!"' http://localhost:8000/demo/example/test`
113-
- get it back via the REST API:
113+
- get it back via the REST API:
114114
`curl http://localhost:8000/demo/example/test`
115115

116116
- **router admin space via the REST API**
117-
- run the Zenoh router with permission to perform config changes via the admin space, and with a memory storage:
117+
- run the Zenoh router with permission to perform config changes via the admin space, and with a memory storage:
118118
`./target/release/zenohd --adminspace-permissions=rw --cfg='plugins/storage_manager/storages/demo:{key_expr:"demo/example/**",volume:"memory"}'`
119-
- in another shell, get info of the zenoh router via the zenoh admin space:
119+
- in another shell, get info of the zenoh router via the zenoh admin space:
120120
`curl http://localhost:8000/@/router/local`
121-
- get the volumes of the router (only memory by default):
121+
- get the volumes of the router (only memory by default):
122122
`curl 'http://localhost:8000/@/router/local/**/volumes/*'`
123-
- get the storages of the local router (the memory storage configured at startup on '/demo/example/**' should be present):
123+
- get the storages of the local router (the memory storage configured at startup on '/demo/example/**' should be present):
124124
`curl 'http://localhost:8000/@/router/local/**/storages/*'`
125-
- add another memory storage on `/demo/mystore/**`:
125+
- add another memory storage on `/demo/mystore/**`:
126126
`curl -X PUT -H 'content-type:application/json' -d '{"key_expr":"demo/mystore/**","volume":"memory"}' http://localhost:8000/@/router/local/config/plugins/storage_manager/storages/mystore`
127-
- check it has been created:
127+
- check it has been created:
128128
`curl 'http://localhost:8000/@/router/local/**/storages/*'`
129129

130130
**Configuration options:**
@@ -133,16 +133,20 @@ A Zenoh configuration file can be provided via CLI to all Zenoh examples and the
133133

134134
* `-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.
135135

136+
136137
See other examples of Zenoh usage in [examples/](examples)
137138

139+
> [!NOTE]
140+
> **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+
138142
-------------------------------
139143
## Zenoh router command line arguments
140144
`zenohd` accepts the following arguments:
141145

142146
* `--adminspace-permissions <[r|w|rw|none]>`: Configure the read and/or write permissions on the admin space. Default is read only.
143147
* `-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.
144148
* `--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.
145-
* `-l, --listen <ENDPOINT>...`: An endpoint on which this router will listen for incoming sessions.
149+
* `-l, --listen <ENDPOINT>...`: An endpoint on which this router will listen for incoming sessions.
146150
Repeat this option to open several listeners. By default, `tcp/[::]:7447` is used. The following endpoints are currently supported:
147151
- TCP: `tcp/<host_name_or_IPv4_or_IPv6>:<port>`
148152
- UDP: `udp/<host_name_or_IPv4_or_IPv6>:<port>`
@@ -184,8 +188,8 @@ Otherwise, incompatibilities in memory mapping of shared types between `zenohd`
184188

185189
By default the Zenoh router is delivered or built with 2 plugins. These may be configured through a configuration file, or through individual changes to the configuration via the `--cfg` CLI option or via zenoh puts on individual parts of the configuration.
186190

187-
> [!WARNING]
188-
> Since `v0.6`, `zenohd` no longer loads every available plugin at startup. Instead, only configured plugins are loaded (after processing `--cfg` and `--plugin` options). Once `zenohd` is running, plugins can be hot-loaded and, if they support it, reconfigured at runtime by editing their configuration through the adminspace.
191+
> [!WARNING]
192+
> Since `v0.6`, `zenohd` no longer loads every available plugin at startup. Instead, only configured plugins are loaded (after processing `--cfg` and `--plugin` options). Once `zenohd` is running, plugins can be hot-loaded and, if they support it, reconfigured at runtime by editing their configuration through the adminspace.
189193
190194
Note that the REST plugin is added to the configuration by the default value of the `--rest-http-port` CLI argument.
191195

@@ -198,5 +202,5 @@ This plugin allows you to easily define storages. These will store key-value pai
198202
-------------------------------
199203
## Troubleshooting
200204

201-
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.
205+
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.
202206
Otherwise, you can ask a question on the [zenoh Discord server](https://discord.gg/vSDSpqnbkm), or [create an issue](https://github.com/eclipse-zenoh/zenoh/issues).

0 commit comments

Comments
 (0)