SlideShare a Scribd company logo
1 of 33
Download to read offline
Zero Overhead


Pub/Sub


Store/Query


Compute
Advanced Technology Office


Angelo	Corsaro,	PhD
Chief	Technology	Officer
Luca	Cominardi,	PhD
Senior	Technologist
Gabriele	Baldoni
Technologist
Julien	Enoch
Senior	Technologist
Olivier	Hecart
Senior	Technologist


installation
in Python
Requires Python 3.6 minimum.


Latest version (stable):


• Available on pypi.org (https://pypi.org/project/eclipse-zenoh)


• Binary wheels for x86_64, i686 and aarch64


• For other platforms: source distribution requiring Rust toolchain (https://www.rust-lang.org/tools/install)
pip install eclipse-zenoh
Version in development (master):


• https://github.com/eclipse-zenoh/zenoh-python


• Requires Rust toolchain (https://www.rust-lang.org/tools/install)
pip install https://github.com/eclipse-zenoh/zenoh-python/zipball/master
Code examples:


• https://github.com/eclipse-zenoh/zenoh-python/tree/master/examples/zenoh
router - in Docker
Latest version (stable):
docker pull eclipse/zenoh:latest
Version in development (master):
docker pull eclipse/zenoh:master
Usage:
docker run --init eclipse/zenoh --help
docker run --init -p 7447:7447/tcp -p 7447:7447/udp -p 8000:8000/tcp eclipse/zenoh
router - native
Latest version (stable):


• https://download.eclipse.org/zenoh/zenoh/latest


• Files: eclipse-zenoh-<version>-<platform>.tgz (or .zip)
Version in development (master):


• https://download.eclipse.org/zenoh/zenoh/master


• Files: eclipse-zenoh-<version>-<platform>.tgz (or .zip)
zenohd --help
RUST_LOG=info zenohd
Usage:


geo-distributed
Peer-to-peer
Peer
Peer
Peer
Peer
Peer
• Multicast discovery


• Unicast “neighbour to
neighbour” discovery


• Unicast “reference
point” discovery
from zenoh import Zenoh


z = Zenoh({"mode": "peer"})
Clique
Peer
Peer
Peer
Peer
Peer
Available soon !!!
Mesh
Peer init in Python:
Routed communication
Client
Client
Client
Client


Router
from zenoh import Zenoh


z = Zenoh({


"mode": "client",


"peer": "tcp/127.0.0.1:7447"


})
Client init in Python:
zenohd
Single router startup:
Routed communication
Client
Client
Peer
Peer
Peer
Peer
Peer
Peer
Peer
Peer
Peer
Peer


Router
Routers network
Clique Mesh
Available soon !!!


Router


Router


Router


Router


Router


Router


Router


Router


Router


Router
zenohd


-e tcp/<host1>:7447


-e tcp/<host2>:7447


...
Connected router startup:
Full picture Peer
Peer
Peer
Peer
Peer
Peer
Peer
Peer
Peer
Peer Client
Client
Client


Router


Router


Router


pub/sub
pub/sub in Python
Publications are made via the put() operation:


• See https://github.com/eclipse-zenoh/zenoh-python/blob/master/examples/zenoh/z_put.py
from zenoh import Zenoh


z = Zenoh({})


workspace = z.workspace()


workspace.put("/demo/example/hi", "Hello World!")
Subscriptions are made via the subscribe() operation:


• See https://github.com/eclipse-zenoh/zenoh-python/blob/master/examples/zenoh/z_sub.py
from zenoh import Zenoh, ChangeKind


def listener(change):


print("{} : {} (encoding: {} , timestamp: {})".format(change.path,


"DELETED" if change.kind == ChangeKind.DELETE else change.value.get_content(),


"none" if change.kind == ChangeKind.DELETE else change.value.encoding_descr(),


change.timestamp))


z = Zenoh({})


workspace = z.workspace()


workspace.subscribe("/demo/example/**", listener)
Value types and encodings
zenoh supports different value types.


Each has an encoding described by its mime-type:
from zenoh import Zenoh


import json


z = Zenoh({})


workspace = z.workspace()


# - String


workspace.put('/demo/example/String', 'Hello World!')


# - Integer


workspace.put('/demo/example/Integer', 3)


# - Float


workspace.put('/demo/example/Float', 3.14)


# - Properties (as a Dictionary with str only)


workspace.put('/demo/example/Properties', {'p1': 'v1', 'p2': 'v2'})


# - Json (str format)


workspace.put('/demo/example/Json',


Value.Json(json.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}])))


# - Raw ('application/octet-stream' encoding by default)


workspace.put('/demo/example/Raw', b'x48x69x21')


# - Custom


workspace.put('/demo/example/Custom',


Value.Custom('my_encoding', b'x48x69x21'))


store/query
Storages
Peer
Peer
Peer
Peer
Peer Client
Client
Client


Router


Router


Router
zenohd


--mem-storage '/a/b/**'


--mem-storage '/x/y/**'


...
Router with in-memory storages:
• Deployed in router


• Store publications
matching its selector


• Replies to queries
/a/b/**
/x/y/**
put(/x/y/1)
put(/a/b/2)
get(a/b/*)
g
e
t
(
/
x
/
y
/
*
)
pub/store/query in Python
Deletions from storage are made via the delete() operation:


• See https://github.com/eclipse-zenoh/zenoh-python/blob/master/examples/zenoh/z_delete.py
from zenoh import Zenoh


z = Zenoh({})


workspace = z.workspace()


workspace.delete("/demo/example/hi")
Publications are made via the put() operation (seen previously).


Queries are made via the get() operation:


• See https://github.com/eclipse-zenoh/zenoh-python/blob/master/examples/zenoh/z_get.py
from zenoh import Zenoh


z = Zenoh({})


workspace = z.workspace()


for data in workspace.get("/demo/example/**"):


print("{} : {} (encoding: {} , timestamp: {})".format(


data.path, data.value.get_content(), data.value.encoding_descr(), data.timestamp))


compute/query
Compute
Peer
Peer
Peer
Peer
Peer Client
Client
Client


Router


Router


Router
• Eval function declared by
zenoh applications that
compute a value on demand


• Called by queries
register_eval(/x/y/z)
get(a/b/*)
g
e
t
(
/
x
/
y
/
*
)
register_eval(/a/b/c)
Compute/query in Python
Queries are made via the get() operation (seen previously).
Compute are declared via the register_eval() operation:


• See https://github.com/eclipse-zenoh/zenoh-python/blob/master/examples/zenoh/z_eval.py
import datetime


from zenoh import Zenoh


def eval_callback(get_request):


get_request.reply("/demo/example/eval", "It's {}".format(datetime.datetime.now().time()))


z = Zenoh({})


workspace = z.workspace()


workspace.register_eval("/demo/example/eval", eval_callback)


REST API
REST API
Implemented as a plugin. Default port: 8080.


The zenoh put/get/delete operations map to the PUT/GET/DELETE HTTP methods.


Example using the curl command:
# Put a string value in /demo/example/test


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


# Put a JSON value in /demo/example/json


curl -X PUT -H "Content-Type: application/json" -d '{"value": "Hello World!"}' http://localhost:8000/demo/example/test


# Put a Properties value in /demo/example/props


curl -X PUT -H 'content-type:application/properties' -d 'k1=v1;k2=v2' http://localhost:8000/demo/example/props


# Get the keys/values matching /demo/**


curl http://localhost:8000/demo/**


# Get the keys/values matching /demo/example/*eval (i.e. the zenoh eval examples)


# with property name=Bob


curl http://localhost:8000/demo/example/*eval?(name=Bob)


# Delete key/value /demo/example/test


curl -X DELETE http://localhost:8000/demo/example/test


backend and storages
Backends
A zenoh backend is:


• a library, loaded on demand by the zenoh router (name: libzbackend_<id>.so)


• a factory for zenoh storages


• leveraging a speci
fi
c technology to implement storages


Existing backends:


• In-memory: built-in in zenoh router


• File system:


• https://github.com/eclipse-zenoh/zenoh-backend-
fi
lesystem


• RocksDB:


• https://github.com/eclipse-zenoh/zenoh-backend-rocksdb


• In
fl
uxDB:


• https://github.com/eclipse-zenoh/zenoh-backend-in
fl
uxdb
Admin space
zenoh admin space:


•A zenoh key/value space with under /@/**


•Addressable via zenoh APIs


using put/get/delete operations


•Each router addressable via its ID, or the "local"
keyword for the router an API is connected to
/@/router/1a2b3c.../plugin/storages
/backend
/memory /rocksdb /<beid>
/storage /storage
/s2
/s1
...
...
/storage
/db2
/db1 ...
# Get local router's info


curl http://localhost:8000/@/router/local


# Get all routers' of the system


curl http://localhost:8000/@/router/*


# Get local router's storages info


curl http://localhost:8000/@/router/local/**/storages/**
Examples using the REST API:
Backends/storages management
Examples using the REST API:
# Add a memory storage


curl -X PUT -H 'content-type:application/properties' -d 'path_expr=/demo/test/**'


http://localhost:8000/@/router/local/plugin/storages/backend/memory/storage/my-test


# Add a FileSystem backend (assuming libzbackend_fs.so is available)


curl -X PUT -H 'content-type:application/properties'


http://localhost:8000/@/router/local/plugin/storages/backend/fs


# Add a FileSystem storage


curl -X PUT -H 'content-type:application/properties' -d 'path_expr=/demo/example/**;path_prefix=/demo/example;dir=test'


http://localhost:8000/@/router/local/plugin/storages/backend/fs/storage/my-test


# Add an InfluxDB backend (assuming libzbackend_influxdb.so is available and InfluxDB running at http://localhost:8086)


curl -X PUT -H 'content-type:application/properties' -d 'url=http://localhost:8086'


http://localhost:8000/@/router/local/plugin/storages/backend/influxdb


# Add an InfluxDB storage using the database named "zenoh-example"


curl -X PUT -H 'content-type:application/properties' -d 'path_expr=/demo/example/**;db=zenoh-example'


http://localhost:8000/@/router/local/plugin/storages/backend/influxdb/storage/my-test


plugins
Plugins
A zenoh plugin is


• a library, loaded at start-up by the zenoh router (name: libzplugin_<id>.so)


• similar to zenoh application using the zenoh APIs (in RUST)


• using the router's runtime => no transport overhead


Existing plugins:


• REST plugin (packaged with zenoh deliverable)


• Storages plugin (packaged with zenoh deliverable)


• WebServer plugin:


• https://github.com/eclipse-zenoh/zenoh-plugin-webserver


• DDS plugin:


• https://github.com/eclipse-zenoh/zenoh-plugin-dds
Live Demo
zenoh
us-west.zenoh.io


/demo/us-west/**
us-east.zenoh.io


/demo/us-east/**
eu.zenoh.io


/demo/eu/**
ap.zenoh.io


/demo/ap/**
Example:


• Put data: curl -X PUT -d 'Hello World!' http://us-west.zenoh.io:8000/demo/eu/test


• Get data: curl http://ap.zenoh.io:8000/demo/*/test
us-west.zenoh.io


/demo/us-west/**
us-east.zenoh.io


/demo/us-east/**
eu.zenoh.io


/demo/eu/**
ap.zenoh.io


/demo/ap/**
Example:


• Get time series: curl http://us-west.zenoh.io:8000/demo/influxdb/**?(stoptime=now())


• Browse /public/**: http://eu.zenoh.io:8080/public
File system storage


/public/**
File system storage


/public/**
InfluxDB storage


/demo/influxdb/**
RocksDB storage


/demo/rocksdb/**
After addition of backends/storages:
References
Innovating Together

More Related Content

What's hot

Essentials of Multithreaded System Programming in C++
Essentials of Multithreaded System Programming in C++Essentials of Multithreaded System Programming in C++
Essentials of Multithreaded System Programming in C++Shuo Chen
 
LogbackからLog4j 2への移行によるアプリケーションのスループット改善 ( JJUG CCC 2021 Fall )
LogbackからLog4j 2への移行によるアプリケーションのスループット改善 ( JJUG CCC 2021 Fall ) LogbackからLog4j 2への移行によるアプリケーションのスループット改善 ( JJUG CCC 2021 Fall )
LogbackからLog4j 2への移行によるアプリケーションのスループット改善 ( JJUG CCC 2021 Fall ) Hironobu Isoda
 
The Data Distribution Service Tutorial
The Data Distribution Service TutorialThe Data Distribution Service Tutorial
The Data Distribution Service TutorialAngelo Corsaro
 
Goでヤフーの分散オブジェクトストレージを作った話 Go Conference 2017 Spring
Goでヤフーの分散オブジェクトストレージを作った話 Go Conference 2017 SpringGoでヤフーの分散オブジェクトストレージを作った話 Go Conference 2017 Spring
Goでヤフーの分散オブジェクトストレージを作った話 Go Conference 2017 SpringYahoo!デベロッパーネットワーク
 
JavaScriptとWebGLで圧倒的な3D空戦バトルを再現。「編隊少女 -フォーメーションガールズ-」における3Dレンダリング技術解説 ~Babylo...
JavaScriptとWebGLで圧倒的な3D空戦バトルを再現。「編隊少女 -フォーメーションガールズ-」における3Dレンダリング技術解説 ~Babylo...JavaScriptとWebGLで圧倒的な3D空戦バトルを再現。「編隊少女 -フォーメーションガールズ-」における3Dレンダリング技術解説 ~Babylo...
JavaScriptとWebGLで圧倒的な3D空戦バトルを再現。「編隊少女 -フォーメーションガールズ-」における3Dレンダリング技術解説 ~Babylo...Katsushi Suzuki
 
Apache Spark on K8S and HDFS Security with Ilan Flonenko
Apache Spark on K8S and HDFS Security with Ilan FlonenkoApache Spark on K8S and HDFS Security with Ilan Flonenko
Apache Spark on K8S and HDFS Security with Ilan FlonenkoDatabricks
 
A Rusty introduction to Apache Arrow and how it applies to a time series dat...
A Rusty introduction to Apache Arrow and how it applies to a  time series dat...A Rusty introduction to Apache Arrow and how it applies to a  time series dat...
A Rusty introduction to Apache Arrow and how it applies to a time series dat...Andrew Lamb
 
FIWARE Tech Summit - FIWARE Cygnus and STH-Comet
FIWARE Tech Summit - FIWARE Cygnus and STH-CometFIWARE Tech Summit - FIWARE Cygnus and STH-Comet
FIWARE Tech Summit - FIWARE Cygnus and STH-CometFIWARE
 
Xbyakの紹介とその周辺
Xbyakの紹介とその周辺Xbyakの紹介とその周辺
Xbyakの紹介とその周辺MITSUNARI Shigeo
 
Spark (Structured) Streaming vs. Kafka Streams
Spark (Structured) Streaming vs. Kafka StreamsSpark (Structured) Streaming vs. Kafka Streams
Spark (Structured) Streaming vs. Kafka StreamsGuido Schmutz
 
Change Data Capture to Data Lakes Using Apache Pulsar and Apache Hudi - Pulsa...
Change Data Capture to Data Lakes Using Apache Pulsar and Apache Hudi - Pulsa...Change Data Capture to Data Lakes Using Apache Pulsar and Apache Hudi - Pulsa...
Change Data Capture to Data Lakes Using Apache Pulsar and Apache Hudi - Pulsa...StreamNative
 
The DDS Tutorial Part II
The DDS Tutorial Part IIThe DDS Tutorial Part II
The DDS Tutorial Part IIAngelo Corsaro
 
FIWARE Training: JSON-LD and NGSI-LD
FIWARE Training: JSON-LD and NGSI-LDFIWARE Training: JSON-LD and NGSI-LD
FIWARE Training: JSON-LD and NGSI-LDFIWARE
 
Distributed Lock Manager
Distributed Lock ManagerDistributed Lock Manager
Distributed Lock ManagerHao Chen
 
Netty Notes Part 3 - Channel Pipeline and EventLoops
Netty Notes Part 3 - Channel Pipeline and EventLoopsNetty Notes Part 3 - Channel Pipeline and EventLoops
Netty Notes Part 3 - Channel Pipeline and EventLoopsRick Hightower
 
Paul Dix [InfluxData] The Journey of InfluxDB | InfluxDays 2022
Paul Dix [InfluxData] The Journey of InfluxDB | InfluxDays 2022Paul Dix [InfluxData] The Journey of InfluxDB | InfluxDays 2022
Paul Dix [InfluxData] The Journey of InfluxDB | InfluxDays 2022InfluxData
 
Dockerを活用したリクルートグループ開発基盤の構築
Dockerを活用したリクルートグループ開発基盤の構築Dockerを活用したリクルートグループ開発基盤の構築
Dockerを活用したリクルートグループ開発基盤の構築Recruit Technologies
 

What's hot (20)

Essentials of Multithreaded System Programming in C++
Essentials of Multithreaded System Programming in C++Essentials of Multithreaded System Programming in C++
Essentials of Multithreaded System Programming in C++
 
LogbackからLog4j 2への移行によるアプリケーションのスループット改善 ( JJUG CCC 2021 Fall )
LogbackからLog4j 2への移行によるアプリケーションのスループット改善 ( JJUG CCC 2021 Fall ) LogbackからLog4j 2への移行によるアプリケーションのスループット改善 ( JJUG CCC 2021 Fall )
LogbackからLog4j 2への移行によるアプリケーションのスループット改善 ( JJUG CCC 2021 Fall )
 
The Data Distribution Service Tutorial
The Data Distribution Service TutorialThe Data Distribution Service Tutorial
The Data Distribution Service Tutorial
 
Goでヤフーの分散オブジェクトストレージを作った話 Go Conference 2017 Spring
Goでヤフーの分散オブジェクトストレージを作った話 Go Conference 2017 SpringGoでヤフーの分散オブジェクトストレージを作った話 Go Conference 2017 Spring
Goでヤフーの分散オブジェクトストレージを作った話 Go Conference 2017 Spring
 
JavaScriptとWebGLで圧倒的な3D空戦バトルを再現。「編隊少女 -フォーメーションガールズ-」における3Dレンダリング技術解説 ~Babylo...
JavaScriptとWebGLで圧倒的な3D空戦バトルを再現。「編隊少女 -フォーメーションガールズ-」における3Dレンダリング技術解説 ~Babylo...JavaScriptとWebGLで圧倒的な3D空戦バトルを再現。「編隊少女 -フォーメーションガールズ-」における3Dレンダリング技術解説 ~Babylo...
JavaScriptとWebGLで圧倒的な3D空戦バトルを再現。「編隊少女 -フォーメーションガールズ-」における3Dレンダリング技術解説 ~Babylo...
 
Apache Spark on K8S and HDFS Security with Ilan Flonenko
Apache Spark on K8S and HDFS Security with Ilan FlonenkoApache Spark on K8S and HDFS Security with Ilan Flonenko
Apache Spark on K8S and HDFS Security with Ilan Flonenko
 
A Rusty introduction to Apache Arrow and how it applies to a time series dat...
A Rusty introduction to Apache Arrow and how it applies to a  time series dat...A Rusty introduction to Apache Arrow and how it applies to a  time series dat...
A Rusty introduction to Apache Arrow and how it applies to a time series dat...
 
MongoDB Oplog入門
MongoDB Oplog入門MongoDB Oplog入門
MongoDB Oplog入門
 
FIWARE Tech Summit - FIWARE Cygnus and STH-Comet
FIWARE Tech Summit - FIWARE Cygnus and STH-CometFIWARE Tech Summit - FIWARE Cygnus and STH-Comet
FIWARE Tech Summit - FIWARE Cygnus and STH-Comet
 
使ってみませんか?pg_hint_plan
使ってみませんか?pg_hint_plan使ってみませんか?pg_hint_plan
使ってみませんか?pg_hint_plan
 
Xbyakの紹介とその周辺
Xbyakの紹介とその周辺Xbyakの紹介とその周辺
Xbyakの紹介とその周辺
 
Spark (Structured) Streaming vs. Kafka Streams
Spark (Structured) Streaming vs. Kafka StreamsSpark (Structured) Streaming vs. Kafka Streams
Spark (Structured) Streaming vs. Kafka Streams
 
Advanced Json
Advanced JsonAdvanced Json
Advanced Json
 
Change Data Capture to Data Lakes Using Apache Pulsar and Apache Hudi - Pulsa...
Change Data Capture to Data Lakes Using Apache Pulsar and Apache Hudi - Pulsa...Change Data Capture to Data Lakes Using Apache Pulsar and Apache Hudi - Pulsa...
Change Data Capture to Data Lakes Using Apache Pulsar and Apache Hudi - Pulsa...
 
The DDS Tutorial Part II
The DDS Tutorial Part IIThe DDS Tutorial Part II
The DDS Tutorial Part II
 
FIWARE Training: JSON-LD and NGSI-LD
FIWARE Training: JSON-LD and NGSI-LDFIWARE Training: JSON-LD and NGSI-LD
FIWARE Training: JSON-LD and NGSI-LD
 
Distributed Lock Manager
Distributed Lock ManagerDistributed Lock Manager
Distributed Lock Manager
 
Netty Notes Part 3 - Channel Pipeline and EventLoops
Netty Notes Part 3 - Channel Pipeline and EventLoopsNetty Notes Part 3 - Channel Pipeline and EventLoops
Netty Notes Part 3 - Channel Pipeline and EventLoops
 
Paul Dix [InfluxData] The Journey of InfluxDB | InfluxDays 2022
Paul Dix [InfluxData] The Journey of InfluxDB | InfluxDays 2022Paul Dix [InfluxData] The Journey of InfluxDB | InfluxDays 2022
Paul Dix [InfluxData] The Journey of InfluxDB | InfluxDays 2022
 
Dockerを活用したリクルートグループ開発基盤の構築
Dockerを活用したリクルートグループ開発基盤の構築Dockerを活用したリクルートグループ開発基盤の構築
Dockerを活用したリクルートグループ開発基盤の構築
 

Similar to Zenoh Tutorial

Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)Itzik Kotler
 
Smash the Stack: Writing a Buffer Overflow Exploit (Win32)
Smash the Stack: Writing a Buffer Overflow Exploit (Win32)Smash the Stack: Writing a Buffer Overflow Exploit (Win32)
Smash the Stack: Writing a Buffer Overflow Exploit (Win32)Elvin Gentiles
 
Shared Object images in Docker: What you need is what you want.
Shared Object images in Docker: What you need is what you want.Shared Object images in Docker: What you need is what you want.
Shared Object images in Docker: What you need is what you want.Workhorse Computing
 
Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015Alex S
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer ToolboxPablo Godel
 
Jak se ^bonami\.(cz|pl|sk)$ vešlo do kontejneru
Jak se ^bonami\.(cz|pl|sk)$ vešlo do kontejneruJak se ^bonami\.(cz|pl|sk)$ vešlo do kontejneru
Jak se ^bonami\.(cz|pl|sk)$ vešlo do kontejneruVašek Boch
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014biicode
 
PHP Dependency Management with Composer
PHP Dependency Management with ComposerPHP Dependency Management with Composer
PHP Dependency Management with ComposerAdam Englander
 
Intro To Gentoo Embedded Cclug
Intro To Gentoo Embedded CclugIntro To Gentoo Embedded Cclug
Intro To Gentoo Embedded CclugSteve Arnold
 
Puppet control-repo 
to the next level
Puppet control-repo 
to the next levelPuppet control-repo 
to the next level
Puppet control-repo 
to the next levelAlessandro Franceschi
 
Software Quality Assurance Tooling 2023
Software Quality Assurance Tooling 2023Software Quality Assurance Tooling 2023
Software Quality Assurance Tooling 2023Henry Schreiner
 
Terraform in deployment pipeline
Terraform in deployment pipelineTerraform in deployment pipeline
Terraform in deployment pipelineAnton Babenko
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-wayRobert Lujo
 
Porting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidPorting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidVlatko Kosturjak
 
Development Workflow Tools for Open-Source PHP Libraries
Development Workflow Tools for Open-Source PHP LibrariesDevelopment Workflow Tools for Open-Source PHP Libraries
Development Workflow Tools for Open-Source PHP LibrariesPantheon
 
Faster Container Image Distribution on a Variety of Tools with Lazy Pulling
Faster Container Image Distribution on a Variety of Tools with Lazy PullingFaster Container Image Distribution on a Variety of Tools with Lazy Pulling
Faster Container Image Distribution on a Variety of Tools with Lazy PullingKohei Tokunaga
 

Similar to Zenoh Tutorial (20)

Ropython-windbg-python-extensions
Ropython-windbg-python-extensionsRopython-windbg-python-extensions
Ropython-windbg-python-extensions
 
Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)
 
Smash the Stack: Writing a Buffer Overflow Exploit (Win32)
Smash the Stack: Writing a Buffer Overflow Exploit (Win32)Smash the Stack: Writing a Buffer Overflow Exploit (Win32)
Smash the Stack: Writing a Buffer Overflow Exploit (Win32)
 
Shared Object images in Docker: What you need is what you want.
Shared Object images in Docker: What you need is what you want.Shared Object images in Docker: What you need is what you want.
Shared Object images in Docker: What you need is what you want.
 
Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
 
Jak se ^bonami\.(cz|pl|sk)$ vešlo do kontejneru
Jak se ^bonami\.(cz|pl|sk)$ vešlo do kontejneruJak se ^bonami\.(cz|pl|sk)$ vešlo do kontejneru
Jak se ^bonami\.(cz|pl|sk)$ vešlo do kontejneru
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
PHP Dependency Management with Composer
PHP Dependency Management with ComposerPHP Dependency Management with Composer
PHP Dependency Management with Composer
 
Intro To Gentoo Embedded Cclug
Intro To Gentoo Embedded CclugIntro To Gentoo Embedded Cclug
Intro To Gentoo Embedded Cclug
 
Puppet control-repo 
to the next level
Puppet control-repo 
to the next levelPuppet control-repo 
to the next level
Puppet control-repo 
to the next level
 
Composer
ComposerComposer
Composer
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Software Quality Assurance Tooling 2023
Software Quality Assurance Tooling 2023Software Quality Assurance Tooling 2023
Software Quality Assurance Tooling 2023
 
Terraform in deployment pipeline
Terraform in deployment pipelineTerraform in deployment pipeline
Terraform in deployment pipeline
 
App container rkt
App container rktApp container rkt
App container rkt
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-way
 
Porting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidPorting your favourite cmdline tool to Android
Porting your favourite cmdline tool to Android
 
Development Workflow Tools for Open-Source PHP Libraries
Development Workflow Tools for Open-Source PHP LibrariesDevelopment Workflow Tools for Open-Source PHP Libraries
Development Workflow Tools for Open-Source PHP Libraries
 
Faster Container Image Distribution on a Variety of Tools with Lazy Pulling
Faster Container Image Distribution on a Variety of Tools with Lazy PullingFaster Container Image Distribution on a Variety of Tools with Lazy Pulling
Faster Container Image Distribution on a Variety of Tools with Lazy Pulling
 

More from Angelo Corsaro

Data Decentralisation: Efficiency, Privacy and Fair Monetisation
Data Decentralisation: Efficiency, Privacy and Fair MonetisationData Decentralisation: Efficiency, Privacy and Fair Monetisation
Data Decentralisation: Efficiency, Privacy and Fair MonetisationAngelo Corsaro
 
Breaking the Edge -- A Journey Through Cloud, Edge and Fog Computing
Breaking the Edge -- A Journey Through Cloud, Edge and Fog ComputingBreaking the Edge -- A Journey Through Cloud, Edge and Fog Computing
Breaking the Edge -- A Journey Through Cloud, Edge and Fog ComputingAngelo Corsaro
 
fog05: The Fog Computing Infrastructure
fog05: The Fog Computing Infrastructurefog05: The Fog Computing Infrastructure
fog05: The Fog Computing InfrastructureAngelo Corsaro
 
Cyclone DDS: Sharing Data in the IoT Age
Cyclone DDS: Sharing Data in the IoT AgeCyclone DDS: Sharing Data in the IoT Age
Cyclone DDS: Sharing Data in the IoT AgeAngelo Corsaro
 
fog05: The Fog Computing Platform
fog05: The Fog Computing Platformfog05: The Fog Computing Platform
fog05: The Fog Computing PlatformAngelo Corsaro
 
Programming in Scala - Lecture Four
Programming in Scala - Lecture FourProgramming in Scala - Lecture Four
Programming in Scala - Lecture FourAngelo Corsaro
 
Programming in Scala - Lecture Three
Programming in Scala - Lecture ThreeProgramming in Scala - Lecture Three
Programming in Scala - Lecture ThreeAngelo Corsaro
 
Programming in Scala - Lecture Two
Programming in Scala - Lecture TwoProgramming in Scala - Lecture Two
Programming in Scala - Lecture TwoAngelo Corsaro
 
Programming in Scala - Lecture One
Programming in Scala - Lecture OneProgramming in Scala - Lecture One
Programming in Scala - Lecture OneAngelo Corsaro
 
Data Sharing in Extremely Resource Constrained Envionrments
Data Sharing in Extremely Resource Constrained EnvionrmentsData Sharing in Extremely Resource Constrained Envionrments
Data Sharing in Extremely Resource Constrained EnvionrmentsAngelo Corsaro
 
The DDS Security Standard
The DDS Security StandardThe DDS Security Standard
The DDS Security StandardAngelo Corsaro
 
The Data Distribution Service
The Data Distribution ServiceThe Data Distribution Service
The Data Distribution ServiceAngelo Corsaro
 
RUSTing -- Partially Ordered Rust Programming Ruminations
RUSTing -- Partially Ordered Rust Programming RuminationsRUSTing -- Partially Ordered Rust Programming Ruminations
RUSTing -- Partially Ordered Rust Programming RuminationsAngelo Corsaro
 
Vortex II -- The Industrial IoT Connectivity Standard
Vortex II -- The  Industrial IoT  Connectivity StandardVortex II -- The  Industrial IoT  Connectivity Standard
Vortex II -- The Industrial IoT Connectivity StandardAngelo Corsaro
 
DDS in Action -- Part I
DDS in Action -- Part IDDS in Action -- Part I
DDS in Action -- Part IAngelo Corsaro
 
DDS and OPC UA Explained
DDS and OPC UA ExplainedDDS and OPC UA Explained
DDS and OPC UA ExplainedAngelo Corsaro
 
The Cloudy, Foggy and Misty Internet of Things -- Toward Fluid IoT Architect...
The Cloudy, Foggy and Misty Internet of Things --  Toward Fluid IoT Architect...The Cloudy, Foggy and Misty Internet of Things --  Toward Fluid IoT Architect...
The Cloudy, Foggy and Misty Internet of Things -- Toward Fluid IoT Architect...Angelo Corsaro
 

More from Angelo Corsaro (20)

Data Decentralisation: Efficiency, Privacy and Fair Monetisation
Data Decentralisation: Efficiency, Privacy and Fair MonetisationData Decentralisation: Efficiency, Privacy and Fair Monetisation
Data Decentralisation: Efficiency, Privacy and Fair Monetisation
 
Breaking the Edge -- A Journey Through Cloud, Edge and Fog Computing
Breaking the Edge -- A Journey Through Cloud, Edge and Fog ComputingBreaking the Edge -- A Journey Through Cloud, Edge and Fog Computing
Breaking the Edge -- A Journey Through Cloud, Edge and Fog Computing
 
Eastern Sicily
Eastern SicilyEastern Sicily
Eastern Sicily
 
fog05: The Fog Computing Infrastructure
fog05: The Fog Computing Infrastructurefog05: The Fog Computing Infrastructure
fog05: The Fog Computing Infrastructure
 
Cyclone DDS: Sharing Data in the IoT Age
Cyclone DDS: Sharing Data in the IoT AgeCyclone DDS: Sharing Data in the IoT Age
Cyclone DDS: Sharing Data in the IoT Age
 
fog05: The Fog Computing Platform
fog05: The Fog Computing Platformfog05: The Fog Computing Platform
fog05: The Fog Computing Platform
 
Programming in Scala - Lecture Four
Programming in Scala - Lecture FourProgramming in Scala - Lecture Four
Programming in Scala - Lecture Four
 
Programming in Scala - Lecture Three
Programming in Scala - Lecture ThreeProgramming in Scala - Lecture Three
Programming in Scala - Lecture Three
 
Programming in Scala - Lecture Two
Programming in Scala - Lecture TwoProgramming in Scala - Lecture Two
Programming in Scala - Lecture Two
 
Programming in Scala - Lecture One
Programming in Scala - Lecture OneProgramming in Scala - Lecture One
Programming in Scala - Lecture One
 
Data Sharing in Extremely Resource Constrained Envionrments
Data Sharing in Extremely Resource Constrained EnvionrmentsData Sharing in Extremely Resource Constrained Envionrments
Data Sharing in Extremely Resource Constrained Envionrments
 
The DDS Security Standard
The DDS Security StandardThe DDS Security Standard
The DDS Security Standard
 
The Data Distribution Service
The Data Distribution ServiceThe Data Distribution Service
The Data Distribution Service
 
RUSTing -- Partially Ordered Rust Programming Ruminations
RUSTing -- Partially Ordered Rust Programming RuminationsRUSTing -- Partially Ordered Rust Programming Ruminations
RUSTing -- Partially Ordered Rust Programming Ruminations
 
Vortex II -- The Industrial IoT Connectivity Standard
Vortex II -- The  Industrial IoT  Connectivity StandardVortex II -- The  Industrial IoT  Connectivity Standard
Vortex II -- The Industrial IoT Connectivity Standard
 
Fog Computing Defined
Fog Computing DefinedFog Computing Defined
Fog Computing Defined
 
DDS In Action Part II
DDS In Action Part IIDDS In Action Part II
DDS In Action Part II
 
DDS in Action -- Part I
DDS in Action -- Part IDDS in Action -- Part I
DDS in Action -- Part I
 
DDS and OPC UA Explained
DDS and OPC UA ExplainedDDS and OPC UA Explained
DDS and OPC UA Explained
 
The Cloudy, Foggy and Misty Internet of Things -- Toward Fluid IoT Architect...
The Cloudy, Foggy and Misty Internet of Things --  Toward Fluid IoT Architect...The Cloudy, Foggy and Misty Internet of Things --  Toward Fluid IoT Architect...
The Cloudy, Foggy and Misty Internet of Things -- Toward Fluid IoT Architect...
 

Recently uploaded

Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Recently uploaded (20)

Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Zenoh Tutorial

  • 1. Zero Overhead Pub/Sub Store/Query Compute Advanced Technology Office Angelo Corsaro, PhD Chief Technology Officer Luca Cominardi, PhD Senior Technologist Gabriele Baldoni Technologist Julien Enoch Senior Technologist Olivier Hecart Senior Technologist
  • 3. in Python Requires Python 3.6 minimum. Latest version (stable): • Available on pypi.org (https://pypi.org/project/eclipse-zenoh) • Binary wheels for x86_64, i686 and aarch64 • For other platforms: source distribution requiring Rust toolchain (https://www.rust-lang.org/tools/install) pip install eclipse-zenoh Version in development (master): • https://github.com/eclipse-zenoh/zenoh-python • Requires Rust toolchain (https://www.rust-lang.org/tools/install) pip install https://github.com/eclipse-zenoh/zenoh-python/zipball/master Code examples: • https://github.com/eclipse-zenoh/zenoh-python/tree/master/examples/zenoh
  • 4. router - in Docker Latest version (stable): docker pull eclipse/zenoh:latest Version in development (master): docker pull eclipse/zenoh:master Usage: docker run --init eclipse/zenoh --help docker run --init -p 7447:7447/tcp -p 7447:7447/udp -p 8000:8000/tcp eclipse/zenoh
  • 5. router - native Latest version (stable): • https://download.eclipse.org/zenoh/zenoh/latest • Files: eclipse-zenoh-<version>-<platform>.tgz (or .zip) Version in development (master): • https://download.eclipse.org/zenoh/zenoh/master • Files: eclipse-zenoh-<version>-<platform>.tgz (or .zip) zenohd --help RUST_LOG=info zenohd Usage:
  • 7. Peer-to-peer Peer Peer Peer Peer Peer • Multicast discovery • Unicast “neighbour to neighbour” discovery • Unicast “reference point” discovery from zenoh import Zenoh z = Zenoh({"mode": "peer"}) Clique Peer Peer Peer Peer Peer Available soon !!! Mesh Peer init in Python:
  • 8. Routed communication Client Client Client Client 
 Router from zenoh import Zenoh z = Zenoh({ "mode": "client", "peer": "tcp/127.0.0.1:7447" }) Client init in Python: zenohd Single router startup:
  • 10. Routers network Clique Mesh Available soon !!! 
 Router 
 Router 
 Router 
 Router 
 Router 
 Router 
 Router 
 Router 
 Router 
 Router zenohd 
 -e tcp/<host1>:7447 
 -e tcp/<host2>:7447 
 ... Connected router startup:
  • 11. Full picture Peer Peer Peer Peer Peer Peer Peer Peer Peer Peer Client Client Client 
 Router 
 Router 
 Router
  • 13. pub/sub in Python Publications are made via the put() operation: • See https://github.com/eclipse-zenoh/zenoh-python/blob/master/examples/zenoh/z_put.py from zenoh import Zenoh z = Zenoh({}) workspace = z.workspace() workspace.put("/demo/example/hi", "Hello World!") Subscriptions are made via the subscribe() operation: • See https://github.com/eclipse-zenoh/zenoh-python/blob/master/examples/zenoh/z_sub.py from zenoh import Zenoh, ChangeKind def listener(change): print("{} : {} (encoding: {} , timestamp: {})".format(change.path, "DELETED" if change.kind == ChangeKind.DELETE else change.value.get_content(), "none" if change.kind == ChangeKind.DELETE else change.value.encoding_descr(), change.timestamp)) z = Zenoh({}) workspace = z.workspace() workspace.subscribe("/demo/example/**", listener)
  • 14. Value types and encodings zenoh supports different value types. 
 Each has an encoding described by its mime-type: from zenoh import Zenoh import json z = Zenoh({}) workspace = z.workspace() # - String workspace.put('/demo/example/String', 'Hello World!') # - Integer workspace.put('/demo/example/Integer', 3) # - Float workspace.put('/demo/example/Float', 3.14) # - Properties (as a Dictionary with str only) workspace.put('/demo/example/Properties', {'p1': 'v1', 'p2': 'v2'}) # - Json (str format) workspace.put('/demo/example/Json', Value.Json(json.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}]))) # - Raw ('application/octet-stream' encoding by default) workspace.put('/demo/example/Raw', b'x48x69x21') # - Custom workspace.put('/demo/example/Custom', Value.Custom('my_encoding', b'x48x69x21'))
  • 16. Storages Peer Peer Peer Peer Peer Client Client Client 
 Router 
 Router 
 Router zenohd 
 --mem-storage '/a/b/**' 
 --mem-storage '/x/y/**' 
 ... Router with in-memory storages: • Deployed in router • Store publications matching its selector • Replies to queries /a/b/** /x/y/** put(/x/y/1) put(/a/b/2) get(a/b/*) g e t ( / x / y / * )
  • 17. pub/store/query in Python Deletions from storage are made via the delete() operation: • See https://github.com/eclipse-zenoh/zenoh-python/blob/master/examples/zenoh/z_delete.py from zenoh import Zenoh z = Zenoh({}) workspace = z.workspace() workspace.delete("/demo/example/hi") Publications are made via the put() operation (seen previously). Queries are made via the get() operation: • See https://github.com/eclipse-zenoh/zenoh-python/blob/master/examples/zenoh/z_get.py from zenoh import Zenoh z = Zenoh({}) workspace = z.workspace() for data in workspace.get("/demo/example/**"): print("{} : {} (encoding: {} , timestamp: {})".format( data.path, data.value.get_content(), data.value.encoding_descr(), data.timestamp))
  • 19. Compute Peer Peer Peer Peer Peer Client Client Client 
 Router 
 Router 
 Router • Eval function declared by zenoh applications that compute a value on demand • Called by queries register_eval(/x/y/z) get(a/b/*) g e t ( / x / y / * ) register_eval(/a/b/c)
  • 20. Compute/query in Python Queries are made via the get() operation (seen previously). Compute are declared via the register_eval() operation: • See https://github.com/eclipse-zenoh/zenoh-python/blob/master/examples/zenoh/z_eval.py import datetime from zenoh import Zenoh def eval_callback(get_request): get_request.reply("/demo/example/eval", "It's {}".format(datetime.datetime.now().time())) z = Zenoh({}) workspace = z.workspace() workspace.register_eval("/demo/example/eval", eval_callback)
  • 22. REST API Implemented as a plugin. Default port: 8080. 
 The zenoh put/get/delete operations map to the PUT/GET/DELETE HTTP methods. Example using the curl command: # Put a string value in /demo/example/test curl -X PUT -d 'Hello World!' http://localhost:8000/demo/example/test # Put a JSON value in /demo/example/json curl -X PUT -H "Content-Type: application/json" -d '{"value": "Hello World!"}' http://localhost:8000/demo/example/test # Put a Properties value in /demo/example/props curl -X PUT -H 'content-type:application/properties' -d 'k1=v1;k2=v2' http://localhost:8000/demo/example/props # Get the keys/values matching /demo/** curl http://localhost:8000/demo/** # Get the keys/values matching /demo/example/*eval (i.e. the zenoh eval examples) # with property name=Bob curl http://localhost:8000/demo/example/*eval?(name=Bob) # Delete key/value /demo/example/test curl -X DELETE http://localhost:8000/demo/example/test
  • 24. Backends A zenoh backend is: • a library, loaded on demand by the zenoh router (name: libzbackend_<id>.so) • a factory for zenoh storages • leveraging a speci fi c technology to implement storages Existing backends: • In-memory: built-in in zenoh router • File system: • https://github.com/eclipse-zenoh/zenoh-backend- fi lesystem • RocksDB: • https://github.com/eclipse-zenoh/zenoh-backend-rocksdb • In fl uxDB: • https://github.com/eclipse-zenoh/zenoh-backend-in fl uxdb
  • 25. Admin space zenoh admin space: 
 •A zenoh key/value space with under /@/** 
 •Addressable via zenoh APIs 
 using put/get/delete operations 
 •Each router addressable via its ID, or the "local" keyword for the router an API is connected to /@/router/1a2b3c.../plugin/storages /backend /memory /rocksdb /<beid> /storage /storage /s2 /s1 ... ... /storage /db2 /db1 ... # Get local router's info curl http://localhost:8000/@/router/local # Get all routers' of the system curl http://localhost:8000/@/router/* # Get local router's storages info curl http://localhost:8000/@/router/local/**/storages/** Examples using the REST API:
  • 26. Backends/storages management Examples using the REST API: # Add a memory storage curl -X PUT -H 'content-type:application/properties' -d 'path_expr=/demo/test/**' 
 http://localhost:8000/@/router/local/plugin/storages/backend/memory/storage/my-test # Add a FileSystem backend (assuming libzbackend_fs.so is available) curl -X PUT -H 'content-type:application/properties' 
 http://localhost:8000/@/router/local/plugin/storages/backend/fs # Add a FileSystem storage curl -X PUT -H 'content-type:application/properties' -d 'path_expr=/demo/example/**;path_prefix=/demo/example;dir=test' 
 http://localhost:8000/@/router/local/plugin/storages/backend/fs/storage/my-test # Add an InfluxDB backend (assuming libzbackend_influxdb.so is available and InfluxDB running at http://localhost:8086) curl -X PUT -H 'content-type:application/properties' -d 'url=http://localhost:8086' 
 http://localhost:8000/@/router/local/plugin/storages/backend/influxdb # Add an InfluxDB storage using the database named "zenoh-example" curl -X PUT -H 'content-type:application/properties' -d 'path_expr=/demo/example/**;db=zenoh-example' 
 http://localhost:8000/@/router/local/plugin/storages/backend/influxdb/storage/my-test
  • 28. Plugins A zenoh plugin is • a library, loaded at start-up by the zenoh router (name: libzplugin_<id>.so) • similar to zenoh application using the zenoh APIs (in RUST) • using the router's runtime => no transport overhead Existing plugins: • REST plugin (packaged with zenoh deliverable) • Storages plugin (packaged with zenoh deliverable) • WebServer plugin: • https://github.com/eclipse-zenoh/zenoh-plugin-webserver • DDS plugin: • https://github.com/eclipse-zenoh/zenoh-plugin-dds
  • 30. us-west.zenoh.io 
 /demo/us-west/** us-east.zenoh.io 
 /demo/us-east/** eu.zenoh.io 
 /demo/eu/** ap.zenoh.io /demo/ap/** Example: • Put data: curl -X PUT -d 'Hello World!' http://us-west.zenoh.io:8000/demo/eu/test • Get data: curl http://ap.zenoh.io:8000/demo/*/test
  • 31. us-west.zenoh.io 
 /demo/us-west/** us-east.zenoh.io 
 /demo/us-east/** eu.zenoh.io 
 /demo/eu/** ap.zenoh.io /demo/ap/** Example: • Get time series: curl http://us-west.zenoh.io:8000/demo/influxdb/**?(stoptime=now()) • Browse /public/**: http://eu.zenoh.io:8080/public File system storage 
 /public/** File system storage 
 /public/** InfluxDB storage 
 /demo/influxdb/** RocksDB storage 
 /demo/rocksdb/** After addition of backends/storages: