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

Provide lookup-type alternative to subscriptions #10

Open
m-ronnblom opened this issue Mar 14, 2021 · 0 comments
Open

Provide lookup-type alternative to subscriptions #10

m-ronnblom opened this issue Mar 14, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@m-ronnblom
Copy link
Collaborator

m-ronnblom commented Mar 14, 2021

Certain applications are only interested in what services are available at a particular moment. The way to perform such a lookup-type operation with the current API is to issue a paf_subscribe() and cancel it more-or-less immediately.

However, there is no way for the application to determine an appropriate timeout. This is not so such much of a problem if the lookup is not latency-sensitive, since the timeout can be set to a large value (e.g., one second).

For application that are latency sensitive, a function paf_lookup(), providing a snapshot of the currently-matching services for a particular filter, would make a lot of sense. The Pathfinder client library is in a better position to know what is a suitable timeout (although it might also struggle with the question what is an appropriate value).

The protocol-level facility for this operation is already in place in the form of the "services" command.

@m-ronnblom m-ronnblom added the enhancement New feature or request label Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant