7 releases

0.5.0-beta.8 Mar 31, 2021
0.5.0-beta.7 Feb 4, 2021
0.5.0-beta.5 Nov 2, 2020
0.5.0-beta.4 Oct 30, 2020
0.5.0-beta.2 Sep 22, 2020

#627 in Network programming

Download history 13/week @ 2021-05-26 27/week @ 2021-06-02 22/week @ 2021-06-09 17/week @ 2021-06-16 18/week @ 2021-06-23 4/week @ 2021-06-30 8/week @ 2021-07-07 12/week @ 2021-07-14 8/week @ 2021-07-21 17/week @ 2021-07-28 17/week @ 2021-08-04 15/week @ 2021-08-11 2/week @ 2021-08-18 20/week @ 2021-08-25 20/week @ 2021-09-01 4/week @ 2021-09-08

107 downloads per month
Used in zenoh_backend_traits

EPL-2.0 OR Apache-2.0

1MB
23K SLoC

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:

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

Dependencies

~11–16MB
~325K SLoC