Zenoh backends

The current version of zenoh only supports a memory backend which store paths/values in an internal hashmap. By default this it is available at zenoh router startup.

Note that it is not persistent: as soon as the zenoh router stops, all the paths/values stored in this backend are lost.

You can create storages using this memory backend in two ways:

  • At zenoh router startup, using the '--mem-storage’ option (you can use it several times). For instance:

    zenohd --mem-storage=/demo/example/** --mem-storage=/org/eclipse/zenoh/**
  • Once the zenoh router is running, you can also create a storage via a PUT operation on the administration space using:

    • path: '/@/<router-id>/plugin/storages/backend/memory/storage/<storage-id>'
    • value: a Properties Value containing only the 'path_expr'property

    For instance using the REST API via curl:

    curl -X PUT -H 'content-type:application/properties' -d 'path_expr=/demo/example/**' http://localhost:8000/@/router/local/plugin/storages/backend/memory/storage/my-storage

    Note in this case the usage of the 'local' keyword in the path replacing the router id. Zenoh will automatically replace it with the identifier of the router hosting the REST API.

    Or in Python:

             {'path_expr': '/demo/example/**'})