Need help with zenoh?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

eclipse-zenoh
204 Stars 24 Forks Other 781 Commits 19 Opened issues

Description

zenoh unifies data in motion, data in-use, 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.

Services available

!
?

Need anything else?

Contributors list

zenoh banner

CI Documentation Status Gitter License License

Eclipse zenoh

The Eclipse zenoh: Zero Overhead Pub/sub, Store/Query and Compute.

Eclipse zenoh /zeno/ unifies data in motion, data in-use, 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.

Check the website zenoh.io for more detailed information.


How to build it

Install Cargo and Rust. Currently, zenoh requires a nightly version of Rust, type the following to install it after you have followed the previous instructions:

$ rustup default nightly

And then build zenoh with:

$ cargo build --release --all-targets

How to test it

For convenience, the zenoh router is pre-build and made available in a Docker image: https://hub.docker.com/r/eclipse/zenoh

Thus, run it just doing:

bash
docker pull eclipse/zenoh:latest
docker run --init -p 7447:7447/tcp -p 7447:7447/udp -p 8000:8000/tcp eclipse/zenoh:latest

The ports used by zenoh are the following:

  • 7447/tcp : the zenoh protocol via TCP
  • 7447/udp : the zenoh scouting protocol using UDP multicast (for clients to automatically discover the router)
  • 8000/tcp : the zenoh REST API

All the examples are compiled into the

target/release/examples
directory. They can all work in peer-to-peer, or interconnected via the zenoh router (
target/release/zenohd
).

Then, you can test it using the zenoh API in your favorite language:

Or with the REST API:

Examples of usage with the REST API

The complete Eclipse zenoh's key/value space is accessible through the REST API, using regular HTTP GET, PUT and DELETE methods. In those examples, we use the curl command line tool.

Managing the admin space

  • Get info of the local zenoh router:
    curl http://localhost:8000/@/router/local
    
  • Get the backends of the local router (only memory by default):
    curl 'http://localhost:8000/@/router/local/**/backend/*'
    
  • Get the storages of the local router (none by default):
    curl 'http://localhost:8000/@/router/local/**/storage/*'
    
  • Add a memory storage on
    /demo/example/**
    : ``` 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
### Put/Get into zenoh
Assuming the memory storage has been added, as described above, you can now:

  • Put a key/value into zenoh:

curl -X PUT -d 'Hello World!' http://localhost:8000/demo/example/test

  • Retrieve the key/value:
  • curl http://localhost:8000/demo/example/test
  • Remove the key value
  • curl -X DELETE http://localhost:8000/demo/example/test ```

    We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.