zenoh.net.open connected with not existing host, throws no errors
Yingliangzhe opened this issue · 4 comments
I would like to wrap the zenoh net into another class. As initialization step, a session has been opened and need to be connected to a zenoh bridge on a remote machine. But as I gives the config a not existing host, the session has also been built without throwing an error. It is a feature, that is not created? Or was I using it wrong?
As I search for zenoh-python, there are actually two kinds of zenoh-python, one is eclipse-zenoh/zenoh-python from here, and another one is atolab/zenoh-python, which is read in c and wrapped in python. This makes a little bit confused. Is this repo not being used?
I would like to wrap the zenoh net into another class. As initialization step, a session has been opened and need to be connected to a zenoh bridge on a remote machine. But as I gives the config a not existing host, the session has also been built without throwing an error. It is a feature, that is not created? Or was I using it wrong?
This is the normal behaviour of zenoh API in peer mode: the zenoh-bridge-dds is actually a zenoh peer and your Python application is another peer. Thus you're trying to establish a peer-to-peer deployment. (see all the possible deployments using zenoh here).
In such case zenoh doesn't make any assumption on the start-up order of the peers. As a consequence, it will periodically try to establish the session with the configured peer. And automatically re-try to re-establish in case of communication failure.
As I search for zenoh-python, there are actually two kinds of zenoh-python, one is eclipse-zenoh/zenoh-python from here, and another one is atolab/zenoh-python, which is read in c and wrapped in python. This makes a little bit confused. Is this repo not being used?
The atolab/zenoh-python repository is an old one which dates from before the adoption of the project by the Eclipse Foundation. This repository is actually in "archived" state in Github, and is read-only.
All the repositories used for the Eclipse zenoh softwares are under https://github.com/eclipse-zenoh .
In such case zenoh doesn't make any assumption on the start-up order of the peers. As a consequence, it will periodically try to establish the session with the configured peer. And automatically re-try to re-establish in case of communication failure.
If I run for example the zenoh.net.open()
to connect a non existing host in peer mode, it tries to connect with it, and the code after the zenoh.net.open()
will be executed. But at the same time, the zenoh also tries to connect to that "fake" host parallelly. Did I understand it correctly?
Yes, that is correct.
The code after the zenoh.net.open()
can perform zenoh publications and subscriptions that won't fail, even is there is no connection to any peer. But as soon as the connection is established in parallel of this code, the publications and subscriptions will flow between the peers.
Great! Thank you for your explanation.