zenoh icon indicating copy to clipboard operation
zenoh copied to clipboard

[dev/1.0.0] Rename `publisher`/`subscriber` modules into `publication`/`subscription` and merge `queryable` into `query`

Open wyfo opened this issue 1 year ago • 6 comments

Describe the feature

zenoh::publisher was previously named zenoh::publication, but was renamed to be aligned with subscriber (query module is still not aligned btw). However, maybe we should reverse this renaming, and also rename subscriber module into subscription.

There would be an issue for queryable module, as it would have to be named query, but there is already a module named query. IMO, both should be merged, because queryable is also related to query; now, we have a strange situation where Query type lies in queryable module and not query.

@Mallets @kydos @milyin

wyfo avatar Jun 24 '24 10:06 wyfo

@wyfo I may go one step further, and use the short form pub and sub and query as the latter is short enough.

kydos avatar Jun 24 '24 10:06 kydos

Do you mean zenoh::r#pub? And we are back to use keywords as module name 😛 More seriously, we could also keep the name and provide a renamed reexport, like pub use subscriber as sub.

wyfo avatar Jun 24 '24 10:06 wyfo

Another option could be to unify pub and sub in pubsub. Similarly for query and queryable unified into query.

Mallets avatar Jun 25 '24 08:06 Mallets

I like this idea!

wyfo avatar Jun 25 '24 08:06 wyfo

@wyfo Could you open a PR that address this issue plus https://github.com/eclipse-zenoh/zenoh/issues/1147 and https://github.com/eclipse-zenoh/zenoh/pull/1160? I think we should converge on this aspect pretty soon before the final 1.0.0 release.

Mallets avatar Jun 25 '24 12:06 Mallets

#1147 should be closed, decision having already been taken with #1007. For #1160, @evshary finally agree with the reexport, and for my part, I like so much zenoh::pubsub that I don't think having zenoh::Publisher is important anymore. So it may also be closed.

I will open a PR.

wyfo avatar Jun 25 '24 12:06 wyfo

Closed by https://github.com/eclipse-zenoh/zenoh/pull/1193

Mallets avatar Jul 04 '24 07:07 Mallets