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
add provide messages in reframe #285
Conversation
|
One design point that is implicit here but that may be worth calling out specifically, is that this format implies that providing follows the same behavior as in current IPFS implementations - that a provide has an implicit 24hr ttl. Should we have a provide / retract model like in network indexing instead? |
REFRAME.md
Outdated
| type ProvideRequest struct | ||
| Key &Any | ||
| Providers [Provider] | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From @willscott
One design point that is implicit here but that may be worth calling out specifically, is that this format implies that providing follows the same behavior as in current IPFS implementations - that a provide has an implicit 24hr ttl.
Should we have a provide / retract model like in network indexing instead?
should we support an explicit ttl?
Good questions, a few thoughts:
- This interface cannot be used to proxy requests to the current IPFS Public DHT. This is simply a result of the current RPCs that only accept messages like "I am providing foo" rather than "Alice is providing foo" Remove special cases for Peer and Provider records libp2p/go-libp2p-kad-dht#584. This means the systems most likely to use this in the shorter term are newer systems (e.g. network indexers, things that look like BitTorrent trackers, new DHTs, etc.) and so we can look toward what those systems want to use.
- While people can use transport level protections like bearer tokens , IP censoring, etc. to protect requests like Provide from being spammed, there's nothing in the message really helping a server prevent abuse. Perhaps we want something here to help.
- Do we want to design for these to come in bulk? I guess we could just send multiple messages after each other and rely on transport compression to reduce the overhead, so it might be fine as is.
- Providing a recommended TTL seems pretty reasonable
- Allowing for a retract also seems fairly reasonable, although probably there should either be no expectation from the client that this actually happens or that expectation should be communicated via the response or something (e.g. a reframe server which advertises data to two systems one it can retract from and one it cannot won't be able to fully retract it).
- Note; Retract seems even more problematic than the rest without some authentication/abuse protection that prevents me from retracting your content just because I feel like it (e.g. I ask for providers then retract them all)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I'm happy to add a signature field. I believe we have some prior work here in thinking about signed peer records. is there a documentation to look at to make sure the proposal matches what we ended up with there?
- lets do that later if we find it's a performance issue.
- I think I'll propose an 'advisoryTTL' on requests, and responses - the response may indicate that it's stored for either longer or shorter than the request indicates.
- This seems like a pretty reasonable argument to not include retraction, and save the complexity until we're really sure we need it.
|
@aschmahmann i pushed a proposal for 2 and 4. I wonder if the mechanics around expectations for provides is worth a session at the thing next week? |
|
This is re-based, and ready for a next look |
|
ping @ajnavarro / @aschmahmann / @lidel |
|
Aside from the PR failing this seems fine to me. Ultimately, this is being designed to fit the storetheindex use case and ideally it works for others but if not then If there are no objections or obvious flags to raise then IMO @willscott your team should do some prototyping with this and see if it works for you and we can merge, alternatively we could merge it and mark as "draft" and switch it to non-draft once you're happy with how it works in production. |
|
The linting here does not appear to be a result of this PR fwiw: |
|
Thanks for the flag this seems to have been a result of #292. |
* Add Provide RPC per ipfs/specs#285
|
@willscott do you know if rebasing we can fix the CI errors? Thx! |
|
@ajnavarro re-basing did fix the CI errors |
LGTM and merging. Generally I'd wait until I had running code and got things going before merging, but @willscott's been the one doing the implementation work so if he's happy with merging then I'm happy
Add a
Providerequest/response message for the provide side of delegated routing