ipni / specs

:book: Technical Specification of IPNI Protocols
12 stars 2 forks source link

Introduce specification for cascading lookup query parameter #9

Closed masih closed 1 year ago

masih commented 1 year ago

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 commented 1 year ago

@aschmahmann I would love your review on this spec change please

willscott commented 1 year ago

also probably relevant for @lidel