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

Update to the latest up-python (up-spec v1.6.0-alpha.2) #10

Merged
merged 2 commits into from
Aug 1, 2024

Conversation

neelam-kushwah
Copy link
Contributor

@neelam-kushwah neelam-kushwah commented Jul 25, 2024

#11

Copy link

@evshary evshary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@neelam-kushwah I also made some changes on up-transport-zenoh-rust recently. Perhaps you want to take a look at the recent changes.

up_client_zenoh/constants.py Outdated Show resolved Hide resolved
| [8000-FFFF) | FFFF | | V | | |
| FFFF | FFFF | | V | V | V |

Some organization:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some changes on the table, and you can link to here
https://github.com/eclipse-uprotocol/up-spec/tree/main/up-l1#23-registerlistener

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per the latest changes in spec, using a wildcard source with a sink in the RPC range is now considered an invalid combination where as L2 apis uses this combination for request message type.

up_client_zenoh/upclientzenoh.py Outdated Show resolved Hide resolved
up_client_zenoh/upclientzenoh.py Outdated Show resolved Hide resolved
else:
common_uuri.logging.debug("Failed to get result from invoke_method.")
common_uuri.logging.debug(f"Send request to {uuri}")
rpc_client = InMemoryRpcClient(transport)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, I implemented my own RpcClient for Rust implementation, which uses get() in Zenoh directly. I'm not sure whether you want to do the same thing in Python or not. Both are fine with me, so I leave the decision to you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the transport layer provides three APIs, I focused on implementing only those in the Zenoh transport. The default RPC implementation in the communication layer handles RPC requests and responses effectively, so I avoided creating a separate RPC client implementation as it isn't necessary.

rpc_server.register_listener(uuri, RPCRequestListener())
async def register_rpc():
uuri = create_method_uri()
rpc_server = InMemoryRpcServer(transport)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my Rust examples, I use L1 API to show how to send request and response. I also provide the L2 API for client one. Maybe you also want to offer examples of L1 API.

requirements.txt Outdated Show resolved Hide resolved
Copy link

@evshary evshary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
For the resource ID table, @neelam-kushwah could you please take a look at my recent PR? Let me know whether this works for you or not.

@neelam-kushwah neelam-kushwah merged commit 60fa1c5 into eclipse-uprotocol:main Aug 1, 2024
2 checks passed
@neelam-kushwah neelam-kushwah self-assigned this Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
2 participants