Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to liveliness tokens #67

Merged
merged 2 commits into from
Nov 16, 2023
Merged

Switch to liveliness tokens #67

merged 2 commits into from
Nov 16, 2023

Conversation

Yadunund
Copy link
Member

@Yadunund Yadunund commented Nov 16, 2023

This PR updates the discovery mechanism to rely on liveliness tokens instead of put/del/get commands which also relied on configuring the router with a storage plugin.

A neat outcome of relying on liveliness tokens is that we no longer need to pass --no-daemon to any CLI introspection tooling.

Edit: issues were resolved by 9e622d7

However during testing I observe the following issues:

  1. z_check macro with zc_owned_liveliness_token: Unable to build despite macro available in zenoh_macros.h
/home/yadunund/ws_rmw/src/rmw_alternative/rmw_zenoh_cpp/src/rmw_zenoh.cpp:211:15: error: no matching function for call to ‘z_check(zc_owned_liveliness_token_t&)’
  211 |   if (!z_check(node_data->token)) {
  1. Undefined symbol during runtime when executing z_drop(z_move(zc_owned_liveliness_token_t)) or z_drop(z_move(zc_owned_liveliness_subscriber_options_t))
/home/yadunund/ws_rmw/install/rmw_zenoh_cpp/lib/librmw_zenoh_cpp.so: undefined symbol: _Z6z_dropI27zc_owned_liveliness_token_tEN15zenoh_drop_typeIT_E4typeEPS2_

which demangles to

zenoh_drop_type<zc_owned_liveliness_token_t>::type z_drop<zc_owned_liveliness_token_t>(zc_owned_liveliness_token_t*)

Signed-off-by: Yadunund <yadunund@openrobotics.org>
Signed-off-by: Yadunund <yadunund@openrobotics.org>
@Yadunund
Copy link
Member Author

Issues resolved by switching to zc_liveliness_XX APIs instead of z_drop and z_check macros 9e622d7

@Yadunund Yadunund merged commit 80ee67d into yadu/graph-cache Nov 16, 2023
5 checks passed
@delete-merged-branch delete-merged-branch bot deleted the yadu/liveliness branch November 16, 2023 10:48
clalancette pushed a commit that referenced this pull request Nov 17, 2023
* Switch to liveliness tokens

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Use zc APIs instead of macros to resolve liveliness api issues

Signed-off-by: Yadunund <yadunund@openrobotics.org>

---------

Signed-off-by: Yadunund <yadunund@openrobotics.org>
Yadunund added a commit that referenced this pull request Nov 19, 2023
* Add storage plugin config to router config

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Fix non empty node namespace

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Rely on unordered_map instead of yaml for graph cache

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Update graph cache with publisher data

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Implement basic publisher introspection

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Switch to liveliness tokens (#67)

* Switch to liveliness tokens

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Use zc APIs instead of macros to resolve liveliness api issues

Signed-off-by: Yadunund <yadunund@openrobotics.org>

---------

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Cleanup yaml-cpp

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Cleanup previous graph cache impl

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Refactor topic cache

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Implement liveliness tokens for subscriptions and update graph

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Fix types and type mangling.

When playing around with this I found that the types
weren't being properly filled in, and also weren't being
demangled.  Fix both of those things here, as well
as do a lot of cleanup.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>

* Update README

Signed-off-by: Yadunund <yadunund@openrobotics.org>

---------

Signed-off-by: Yadunund <yadunund@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Co-authored-by: Chris Lalancette <clalancette@gmail.com>
Yadunund added a commit that referenced this pull request Jan 12, 2024
* Add storage plugin config to router config

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Fix non empty node namespace

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Rely on unordered_map instead of yaml for graph cache

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Update graph cache with publisher data

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Implement basic publisher introspection

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Switch to liveliness tokens (#67)

* Switch to liveliness tokens

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Use zc APIs instead of macros to resolve liveliness api issues

Signed-off-by: Yadunund <yadunund@openrobotics.org>

---------

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Cleanup yaml-cpp

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Cleanup previous graph cache impl

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Refactor topic cache

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Implement liveliness tokens for subscriptions and update graph

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Fix types and type mangling.

When playing around with this I found that the types
weren't being properly filled in, and also weren't being
demangled.  Fix both of those things here, as well
as do a lot of cleanup.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>

* Update README

Signed-off-by: Yadunund <yadunund@openrobotics.org>

---------

Signed-off-by: Yadunund <yadunund@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Co-authored-by: Chris Lalancette <clalancette@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant