Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    gardenest
    @gardenest
    Hi, I am just trying to use Zenoh and it's really awesome, I have a question that is it possible to add custom message in the Hello message discovered by scout function? thus I can identify each process by the custom message.
    Angelo Corsaro
    @kydos
    Hello @gardenest, the protocol supports custom attachment for essentually any zenoh message. That said, at this point in time we do not expose this feature in the user API.
    gardenest
    @gardenest
    @kydos Thanks for your reply. This feature is important for device discovery and identification. I'm looking forward for this feature release.
    Shan Desai
    @shantanoo-desai
    thanks @fdesbiens @kydos @JEnoch for the welcome. The first question I actually have is in the description of Zenoh. It mentions geo-distributed storages does this imply geographically distant storage or can be something that is intra-geographical too e.g. within the same building, floor, or factory? I do remember the example Angelo gave of the Museum scenario but just wanted to be sure about it.
    Julien Enoch
    @JEnoch
    Hi @shantanoo-desai ,
    the storages can be deployed at any geographic scale you want.
    Concretely, the zenoh storages are instanciated within a zenoh router process (a.k.a. zenohd binary). And you can deploy those routers wherever you want, as soon as they are interconnected.
    For instance, in Angelo’s example: each router (each square with zenoh logo) can be deployed in different places (floors, buildings, city, cloud…), and the 2 storages could therefore be deployed in the same floor, or on different continents.
    Shan Desai
    @shantanoo-desai
    Okay this is fantastic I actually happen to have a Raspberry Pi Cluster Lab sitting in my premises. I would actually want to give the example a try with an assumption that each Pi is an edge device dedicated to do some tasks.
    Julien Enoch
    @JEnoch
    That would make lot of sense and probably a nice demo :smile:
    Just notice that we don’t provide (yet) pre-built binaries for ARM. You’ll need to build (or cross-build) zenoh by yourself following those instructions.
    Shan Desai
    @shantanoo-desai
    Ah! okay let me see what I can actually leverage. Is there a particular reason why arm64 isn't available at the moment? or are there deps which docker's buildx toolkit doesn't support
    26 replies
    Angelo Corsaro
    @kydos

    @gardenest

    @kydos Thanks for your reply. This feature is important for device discovery and identification. I'm looking forward for this feature release.

    Absolutely, this is one of the reasons why we wanted all messages in our protocol to support user attachments. We are about to finalise the features list for June and July — we’ll try to squeeze this in June. BTW, once the API will expose this feature you’ll be able to attach properties to scout/hello, open as well as to data messages. We keep the working-feature-list on the [github wiki] (https://github.com/eclipse-zenoh/zenoh/wiki/2021). I’ll let you know once that is updated.

    gardenest
    @gardenest
    I'm trying to implement my computation scenarios via the Eval feature and it works well to fit almost my scenarios with query and reply. My question is that I have a scenario need to do multiple reply within one query trigger. Since there are many continuous big data(maybe 2MByte/second last 15 minutes and lost data is not accepted) so I need multiple reply to reply to client application or the memory will be consumed and out of memory.
    Is it possible to do multiple reply within one query? Or do you have any suggestion about how to fit this special scenario?
    Julien Enoch
    @JEnoch
    Hi @gardenest ,
    Yes, in your Eval function, you can call GetRequest::reply() as many time as you want.
    Just notice that if you send several replies with a same Path, the consolidation mode configured by default in the zenoh API will make that your requester will only receive 1 value per Path (the one with the mre recent timestamp). But I guess you probably want to send replies with different Paths, right ?
    gardenest
    @gardenest

    Hi @gardenest ,
    Yes, in your Eval function, you can call GetRequest::reply() as many time as you want.
    Just notice that if you send several replies with a same Path, the consolidation mode configured by default in the zenoh API will make that your requester will only receive 1 value per Path (the one with the mre recent timestamp). But I guess you probably want to send replies with different Paths, right ?

    @JEnoch Actually I need one Path with multiple replies and client need to receive all replies, is that possible?

    Julien Enoch
    @JEnoch

    Yes, it is possible: currently the way for the requester to specify that he wants several replies for a same Path is to set the starttime and/or the stoptime as properties in the Selector.
    That’s for instance used to query the InfluxDB backend. See example of use here:
    https://github.com/eclipse-zenoh/zenoh-backend-influxdb#behaviour-on-get

    Just know that the values of starttime and stoptime properties are not interpreted by the zenoh infrastructure itself, but by the receiver of the GetRequest. I.e. the InfluxDB backend, or your Eval function in your case.
    The InfluxDB backend, for instance, uses the values of starttime and stoptime in the DB query it does to retrieve the time-serie to reply.
    Your Eval function could interpret those starttime and stoptime values in the way you want (or just ignore them). The only missing part we currently have is that in zenoh API, there is no way yet to specify a timestamp with the Value you replies. The timestamp is automatically generated by zenoh when replying, and it could therefore not match the time interval specified in the Selector.
    But that might not be an issue for your use case if you don’t care about timestamps.

    5 replies
    Angelo Corsaro
    @kydos
    Hello everyone, I wanted to let you know that, the sync branch has been merged in master, as a result zenoh (1) has almost doubled throughput for small samples, and (2) provides APIs sync and async programming. These changes have also heavily benefitted zenoh’s C and Python APIs.
    @gardenest as part of our June/July features planning we discussed the protocol attachments. We think we’ll be able to provide something relatively quickly for Hello messages but the generalised mechanism of attachments will remain on next. I hope that suits your needs, please let me know if that is not the case.
    7 replies
    Luca Della Vedova
    @luca-della-vedova
    Hi folks! Luca from Open Robotics here, experimenting with Zenoh. I am trying to get a secure demo to work using TLS in a configuration with one router, one publisher and one subscriber over three different network interfaces configured with mininet and zenoh-python (the repo is https://github.com/luca-della-vedova/robocom-benchmarks, with the relevant functions being testZenoh and the zenoh subfolder). I keep getting errors in connection when TLS is enabled and wireshark shows no packets going through, I wonder if you had any input? I'm using the deb version of zenoh and I built zenoh-python from source, specifically the error is:
    [2021-06-07T08:17:06Z ERROR zenoh::net::runtime::orchestrator] Unable to connect to any of [Tls(SocketAddr(10.0.0.1:7447))]!.
    What I did is follow the instructions in the TLS tutorial, creating the certificates and adding them to the server config / zenoh python configuration
    Julien Enoch
    @JEnoch
    Hi @luca-della-vedova ,
    I had a look to your repo and saw that you use IP address (10.0.0.1) as domain name for the certificate. The TLS implementation used by zenoh (rustls) only supports connections to named hosts (i.e. referenced by a DNS, or at minimum declared in /etc/hosts for local DNS resolution).
    They have plans to support no-DNS configuration (ctz/rustls#331), but it might not be available any time soon.
    For the time being, with zenoh you need to:
    1. choose a hostname for the host running zenohd
    2. generate the certificate with this hostname as domain
    3. configure mininet or your virtual hosts to make sure that the hostname resolution works
    4. change the conf in your zenoh-process.py to use tcp/<your_hostname>:7447 as peer
    Luca Della Vedova
    @luca-della-vedova
    I see, then I will add an host name, thanks for the quick reply!
    Shan Desai
    @shantanoo-desai
    Hi all I was trying to build zenoh on a Raspberry Pi 4 with Ubuntu Server Image on it using cargo build --release --all-targets and it shot an error
    error: linker `cc` not found
    error: could not compile `syn`
    Is this something related to musl or gcc?
    Shan Desai
    @shantanoo-desai
    Never mind it was a problem of the compiler. solved it using apt install build-essential since libc crate needs it
    Shan Desai
    @shantanoo-desai
    Also, maybe I might be wrong here but I am fairly confident that your CI/CD Pipeline for Docker Images might be simplified using Docker's buildx kit and GH Actions. The artifacts are created for all arm64/x86 platforms without having to maintain distinct Dockerfiles for each platforms.
    Any DevOps guy care to weigh in here? I build images for x86 and arm64 (albeit python3x) and GH Actions does the heavy lifting for in terms of QEMU and CI infrastructure.
    Julien Enoch
    @JEnoch
    Hi @shantanoo-desai ,
    Thanks you for your feedback. Unfortunatelly we don’t have a DevOps guy in our team. But we’re grateful for any advices, guidance or contribution!
    BTW I have few questions you might have the answers:
    • for the zenohd and *.so you built this way, which maximal GLIBC version they require (check with ldd -v zenohd *.so | grep GLIBC) ? I manage to cross-build binaries for armv7l using a specific Dockerfile, but unfortunately the resulting libzplugin_storages.so requires GLIBC 2.29 which is greater than the default one on Raspberry Pi OS (2.28)
    • How do you make publicly available the artifacts produced by GH actions ? Eventually, (at least for final releases) we need to make those available on https://download.eclipse.org/zenoh/ , which is writeable only from the Eclipse CI infra
    17 replies
    gardenest
    @gardenest
    I have a situation that when I used a Zenoh peer A connect to a Zenoh router then everything works fine with other peers, but when I use zn_scout example to scout them I only saw peer A. If I use zn_info example, I could see all these peers and router. Is that normal or do I miss something? I assumed I could saw all the connected peers and routers via zn_scout.
    OlivierHecart
    @OlivierHecart

    Hello @gardenest, this is indeed strange. You should see all reachable routers and peers with zn_scout.
    There is a difference between zn_info and zn_scout that could explain this behavior :

    • zn_scout only reports routers and peers that are reachable through multicast.
    • zn_info and other peers by default connect to all routers and peers they discover through multicast AND gossip discovery (then zn_info reports its status).

    So maybe part of your peers are not reachable through multicast but are discovered by zn_info and other peers by gossip discovery (through the router probably).

    gardenest
    @gardenest
    @OlivierHecart Thanks for your reply. Since the zn_scout discovery instance through multicast, does it mean that I can't get all the routers and peers scout information cross network segmentation? If yes, is it possible to get all the instance information? For example, one router and peers located at Asia connected by another router and peers located at USA and I would like to discovery all the device.
    OlivierHecart
    @OlivierHecart
    @gardenest, there is no built-in way to discover all devices across the wan at this time in zenoh. The simplest way to do so right now would be to :
    • register a queryable (or an eval) with a specific path on each device (for example /system/devices/<device_id>).
    • do a query (or a get) to get the list of all devices (for example /system/devices/*)
    OlivierHecart
    @OlivierHecart
    Btw @gardenest, this may solve your "hello attachment" concern as you can put whatever you want in your reply.
    gardenest
    @gardenest
    @OlivierHecart Yes, it could solve my discovery question with an eval function on each device at this time. Thanks for you reply :)
    Tom Burdick
    @bfrog
    how big is zenoh-c as a library?
    or, maybe the better question is, how small can I get it?
    Angelo Corsaro
    @kydos
    Hello Tom, if you are looking for something small take a look at zenoh-pico
    halfbit
    @halfbit:matrix.org
    [m]
    I did see that, though that loses the p2p aspect of zenoh correct? needs a router in that case?
    Angelo Corsaro
    @kydos
    @halfbit:matrix.org, that is right, at the present stage zenoh-pico only supports client mode.
    Angelo Corsaro
    @kydos
    That said, you can run zenoh on anything that supports rust and its std library.
    halfbit
    @halfbit:matrix.org
    [m]
    the libzenohc at its smallest is about 4MB which I mean, considering it has in it rust std, async-std, rustls, and zenoh isn't all that bad
    equivalent C++ stack might be boost, asio, and openssl... which aren't that small (not including the zenoh bits)
    Angelo Corsaro
    @kydos
    Hello zenohers, @OlivierHecart posted a blog on the key mechanisms provided by zenoh for reliability and congestion control. Enjoy the reading.
    halfbit
    @halfbit:matrix.org
    [m]
    is it possible to split peers on the same host, such that maybe process (a,b,c) are in one set and process (x,y,z) are in another set?
    where a,b,c will discover eachother but not x,y,z and vice versa
    OlivierHecart
    @OlivierHecart
    Hi @halfbit:matrix.org, the simplest way to do that if you rely on multicast for discovery is to use a different multicast address and/or port for each group. You can set the multicast locator using config properties like this :
    use zenoh::net::*;
    let mut config = config::peer();
    config.insert(config::ZN_MULTICAST_ADDRESS_KEY, "224.0.0.224:7448".to_string());
    let session = open(config).await.unwrap();
    halfbit
    @halfbit:matrix.org
    [m]
    that makes sense
    Alexandre Santos
    @AlexandreVSantos_gitlab
    Hi guys! I am trying to implement zenoh protocol, or at least some of its features, using sdn technologies. Looking at the code from the github repo I could not understand how routing is done between routers, are any known protocols used, such as OSPF, BGP, etc? Or is it a custom shortest path algorithm used? If so, can someone highlight how it works?
    Thank you in advance
    OlivierHecart
    @OlivierHecart
    Hi @AlexandreVSantos_gitlab, a custom protocol is used between the routers (and between the peers) :
    • A custom linkstate protocol is used so that all routers share a same view of the routers network topology.
    • Then each router runs a bellman-ford algorithm internally from all nodes to build the shortest path tree from each node to any other node.
    • These trees are then used to propagate the subscriptions to all routers.
    • These trees are also used to propagate data to all nodes with a matching subscriber.
    Shan Desai
    @shantanoo-desai
    Hi all I cross-compiled Zenoh for aarch64 for a Pi4 (2GB) and I started the router ./zenohd and followed the steps in the documentation of setting up a local memory storage and tried putting hello world on the API. Upon querying the data I get [ ] although the paths are the same.
    never mind it works forgot the --mem-storage /demo/example/** parameter for zenohd
    Ashwin Sushil
    @ashwinsushil_gitlab
    image.png

    Unable to map ros2 pubisher/listner to Zenoh resources

    Setup

    • A docker container with
      • Zenoh-DDS-bridge installed
      • ROS2 foxy with CycloneDDS
      • Example publisher and subscriber (from ros2 examples)

    Problem/Issue

    • The zenoh bridge is startd with RUST_LOG=debug ./target/release/zenoh-bridge-dds -m peer
    • A ros2 publisher is started with ros2 run examples_rclcpp_minimal_publisher publisher_member_function
    • As shown in the demo here, the user should be able to see the log that the dds plugin has discovered the publisher but it is not happening (Please see the attached image)

    Additional information

    My CycloneDDS config is as following
    <?xml version="1.0" encoding="UTF-8"?>
    <CycloneDDS xmlns="https://cdds.io/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://cdds.io/config https://raw.githubusercontent.com/eclipse-cyclonedds/cyclonedds/master/etc/cyclonedds.xsd">
        <Domain id="any">
            <Discovery>
                <ParticipantIndex>
                    auto
                </ParticipantIndex>
                <MaxAutoParticipantIndex>
                    30
                </MaxAutoParticipantIndex>
            </Discovery>
        </Domain>
    </CycloneDDS>
    6 replies
    Shan Desai
    @shantanoo-desai
    @JEnoch I am trying an initial Workflow for Docker Artefact Build and Publish on my Fork shantanoo-desai/zenoh#1 Fingers Cross
    15 replies
    halfbit
    @halfbit:matrix.org
    [m]
    Is there a simple way to cross compile zenoh-c? It seems to hang up on ring (I think its missing a TARGETCC env var?