-
Notifications
You must be signed in to change notification settings - Fork 9
Allow serving of FindProvider responses for unknown protocol types #39
Comments
|
SGTM, we left that out initially since it seemed like the load difference didn't seem like a big deal to start with. However, yes I suspect over time we may benefit from adding more query/filtering parameters to |
@willscott How do you feel about effectively specifying something for the Indexers where there's an extra description for Metadata: Where if the data is in a particular format it can be easily translated into a Reframe response? The details for what that might look like can be tackled in another issue (e.g. in storetheindex, or wherever you think is best to engage), but wondering if that seems reasonable since without that this issue largely doesn't matter (at least in the shorter term/storetheindex use case) since we'd need to bump code in storetheindex anyway. |
what do you think would be needed to support such a translation? |
Yeah, one way to do this:
- Add a new transport type at the protocol level, called STIMeta, which
holds a byte field for the uninterpreted metadata
- Update the Delegated Routing interface of FindProviders to return a list
of pairs (peer address, transport protocol description).
…On Mon, Aug 22, 2022 at 8:06 AM Will ***@***.***> wrote:
what do you think would be needed to support such a translation?
we could take the arbitrary bytes pushed into indexer metadata, and
pretend they fit the any in reframe
or we can add a assumption, like that any subsequent transport will either
(a) encode it's metadata as cbor, or (b) add a varint for the size of it's
metadata
—
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACFTS2TRFQSSXQB5LDPCHDV2OJPZANCNFSM57HZXXLA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
It shouldn't be too big, it depends on what (if any) information the Indexers want from the metadata vs what Reframe needs. Listing out some levels of flexibility which we can choose to have or not:
This seems like a potential fallback, but it seems like it'd make sense to allow/encourage users to build things which will end up looking like other Reframe responses which can then be added to the schemas (they might not even have to make changes if they use unique names for their new keys). This is basically saying "no" to option 1. |
Sure, it would be better if we can unpack the STI meta into a TransferProtocol structure. This would require some processing on the STI side though:
|
Background
Reframe is extensible and can support processing responses even when it is not fully aware of the detailed schema of the response. For example, the FindProviders method indicates an extensible (i.e. unioned with "Any") TransportProtocol type and Node type.
In order to enable experimentation Reframe servers should not always need to know about every TransportProtocol/Node and therefore require server-side updates in order to respond to updated/experimental clients with new transport types.
Proposal
Instead of having the DelegatedRoutingService require FindProviders to return whatever the client is exposed to, instead have it expose whatever the server actually needs. For example, instead of
go-delegated-routing/server/findproviders.go
Line 18 in a6fd1a5
Return something more broad like:
go-delegated-routing/gen/proto/proto_edelweiss.go
Line 3649 in a6fd1a5
or a struct/interface that captures a similar idea but isn't tied to the generated code itself.
Impact
Having this functionality run on the StoreTheIndex Reframe endpoint will enable users to experiment with advertising data with new protocols and serve them via Reframe even before the groups using them have a) finalized their schemas, b) gotten updated code into storetheindex.
This means a user can just roll up one day, make a protocol advertising that is has blocks it'll serve over HTTP at
https://foo.tld/blocks<cid>
publish it to the Indexers and just pull the responses over Reframe next to the Bitswap and GraphSync responses without coordinating with anyone. Sure, they may still need to decide on a protocol code in the code table but they can get started by either temporarily using a number in the application reserved range, or by choosing some application-specific text as the key.This code currently has some Bitswap hard-coding that shouldn't be there, but there also isn't enough space in the interface to allow much in the way of other types of responses.
https://github.com/filecoin-project/storetheindex/blob/5fcd096da1095bf6d4f77e7b89b7e0a85ff1304e/server/reframe/reframe.go#L39.
WDYT @petar @willscott @ajnavarro ?
The text was updated successfully, but these errors were encountered: