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

Introduce specification for cascading lookup query parameter #9

Merged
merged 2 commits into from
Jan 31, 2023

Commits on Jan 31, 2023

  1. Introduce specification for cascading lookup query parameter

    It is increasingly useful for the users to be able to search alternative
    routing systems through the familiar IPNI endpoints. This greatly
    simplifies the barrier to simply find providers for a given CID, and
    avoid the need to learn about explicit routing systems such as the DHT.
    Further, the results can be cached and reused by others considering
    the fact that a typical IPNI instance will heavily utilise caching
    mechanisms regardless of cascading lookups.
    
    The cascading lookup must be configurable to avoid doubling load on
    other routing systems in a case where, having searched other routing
    systems already, the user exclusively wants to search IPNI. For example,
    Kubo `v0.18.0` is configured by default to lookup records on the DHT and
    on IPNI. Therefore, automatic cascading of lookups onto the DHT by IPNI
    would result in duplication of load and waisted effort since Kubo
    independently looks up the DHT.
    
    The changes here introduce a new query parameter, called `cascade` for
    the lookup APIs, where the user can specify a list of comma separated
    alternative routing systems to which the query is cascaded in addition
    to IPNI. By default no cascading occurs. This allows Kubo to gracefully
    continue functioning while enabling other clients to optionally cascade
    lookups onto the IPFS DHT.
    masih committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    3ef5813 View commit details
    Browse the repository at this point in the history
  2. Add support for listing cascade options

    Specify protocol to find out what cascade options are available to a
    client using `OPTIONS` method and a specific HTTP response header. This
    enables clients to programmatically determine the alternative routing
    systems to which a lookup may optionally be cascaded.
    
    Add extra wording to clarify that there are no constraints on the order
    by which results are returned at the presence of `cascade` query option.
    masih committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    b3060a0 View commit details
    Browse the repository at this point in the history