Skip to content

Commit

Permalink
rewrite motivation
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed May 16, 2023
1 parent 8bff107 commit a34a7cb
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/ipips/ipip-0410.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ using the HTTP Header `Accept` (:cite[rfc9110]) with [Newline Delimited JSON (ND

## Motivation

The main motivation for this change is that a server may take some time before fetching
all the peers they know providing a certain CID. That will add some latency when sending
a non-streamed response, as they need to wait for the whole discovery period.

With streaming support, the server is able to respond with a *read provider record*
as they themselves discover the peers, not needing to wait for the whole discovery
to return the provider records.
The main motivation for this change is to allow servers to respond faster to the
client with provider records, as soon as they are available. In the current state,
the client requests a list of providers for a CID from the server. Then, the client
has to wait for the server to collect their final list of providers. After that,
the server can respond with the full list of providers.

With streaming support, the serve ris able to respond with provider records as soon
as they are available. This reduces latency and allows for faster content discovery.
In addition, streaming responses may produce an unlimited amount of results, which
is not the case for non-streamed responses.

## Detailed design

Expand Down

0 comments on commit a34a7cb

Please sign in to comment.