-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #417 from ipfs/ipip/schema-peer
IPIP-417: Delegated Peer Routing HTTP API
- Loading branch information
Showing
2 changed files
with
189 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
title: "IPIP-0417: Delegated Peer Routing HTTP API" | ||
date: 2023-05-29 | ||
ipip: proposal | ||
editors: | ||
- name: Henrique Dias | ||
github: hacdias | ||
url: https://hacdias.com/ | ||
affiliation: | ||
name: Protocol Labs | ||
url: https://protocol.ai/ | ||
relatedIssues: | ||
- https://github.com/ipfs/specs/pull/410 | ||
- https://github.com/ipfs/kubo/pull/9877 | ||
order: 417 | ||
tags: ['ipips'] | ||
--- | ||
|
||
## Summary | ||
|
||
This IPIP specifies `/routing/v1/peers/{peer-id}` HTTP API to offload peer routing onto another server. | ||
|
||
## Motivation | ||
|
||
The motivation of this IPIP extends the one of :cite[ipip-0337] and :cite[ipip-0379], | ||
which introduced delegated content routing and delegated naming, respectively. Now, | ||
we expand upon those basis to introduce peer routing, reducing the barrier for interaction | ||
across different systems. | ||
|
||
## Detailed design | ||
|
||
Add `/routing/v1/peers/{peer-id}` to the existing :cite[http-routing-v1] specification, | ||
as well as the new Peer schema, that replaces the existing "known transfer protocols". | ||
|
||
## Design rationale | ||
|
||
In line with the remaining Routing V1 API, this IPIP introduces a new HTTP GET | ||
endpoint that is used to retrieve peer records for a certain peer. | ||
|
||
### User benefit | ||
|
||
The user benefit brought by this PR is similar to the one in :cite[ipip-0379], | ||
but instead of offloading the naming process, we offload the peer discovery and | ||
routing. | ||
|
||
### Compatibility | ||
|
||
The section "Known Transfer Protocols" has been removed and replaced by a "Known Schemas" | ||
section. Before, we used to have protocol specific schemas, such as `bitswap` and `graphsync-filecoinv1`. | ||
|
||
The usage of these schemas is no longer encouraged. Instead, clients and | ||
servers SHOULD be updated to use the new, more generic, `peer` schema, which | ||
avoids returning the same peer multiple times, making results more efficient | ||
when a peer supports more than one protocol. | ||
|
||
See more in the "Compatibility" section of :cite[ipip-0337]. | ||
|
||
### Security | ||
|
||
See the "Security" section of :cite[ipip-0337]. | ||
|
||
### Alternatives | ||
|
||
See the "Alternatives" section of :cite[ipip-0337]. | ||
|
||
### Copyright | ||
|
||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters