-
Notifications
You must be signed in to change notification settings - Fork 4
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
TODOs before someguy's General Availability #24
Comments
Looks like this is being done in #50 where both are asked, but trying to understand why a little more. Is this about future proofing? At the moment there are two widely deployed routing "systems" used by IPFS implementations:
delgated-ipfs.dev currently just proxies those two systems. So by default hitting it in addition to the others just means the same query is happening twice, just with maybe some caching happening on delegated-ipfs.dev. What's the goal here? Setting the default for |
@aschmahmann I raised similar questions in #50 (comment) before reading your comment. In my mind the goals of including
My main question is do we even keep We could say we trade the additional request for resiliency of having different hostnames with separate HTTP caches, which I am fine enough as a reason enough to keep it. Thoughts? |
It does support streaming afaik? - is there a subtle difference in the spec vs what we support that we should update? |
This is inaccurate. cid.contact does support streaming result. |
@masih are you sure?
It's doing json rather than ndjson, i.e. it's not streaming and relying on this line from the spec https://specs.ipfs.tech/routing/http-routing-v1/#streaming
Showing this explicitly:
|
cid.contact will stream https://github.com/ipni/indexstar/blob/main/find_ndjson.go#L280-L282 but i think it maybe doesn't do it on the '/routing/v1/providers' endpoint, but rather on the '/mh/' find endpoint that lassie / saturn was using |
Thanks for pointing that out @aschmahmann; you are right. Captured this issue to get it sorted. |
Note on spec:
There's a PR to add support to indexer delegated routing endpoint for streaming here ipni/indexstar#200 |
Also, am I right that delegated routing drops the support for encrypted / double-hashed query/responses? is that something we want to add back in? |
Are you asking to be more explicit by rewriting the same syntax as the responses normally are but without the wrapping instead of the shorthand that's defined in the section you linked? If so that seems fine. Would you be able to put up a PR to https://github.com/ipfs/specs with how you think it should look based on your understanding? If you're having trouble I can put one up and you can review / give feedback there.
Well they're not IPNI responses they're routing responses from whatever the backend is (Amino DHT, IPNI, a custom server someone is running, ...), but yes it we're stripping the wrapper object because we're streaming individually parseable responses
It's never supported them, but yes if you access cid.contact via the delegated routing endpoint rather than the IPNI endpoint you lose the ability to do the double-hashed queries.
Open to feedback here, but TLDR is no since it's currently only useful to IPNI and people can use the IPNI API if they need that functionality. The way I see the delegated routing API is as an abstraction across routing systems that's easy for consumers to work with. The double-hashing is specific to IPNI which means a few things:
Note: Having specific APIs for routing systems that are fulfilled by a single service provider seems reasonable to me. For example, I suggested in ipfs/specs#476 (comment) that we could have Amino DHT or kad-dht specific endpoints that don't apply to others, the same could of course be done for IPNI as well. |
I think the thing i was wondering is that a bunch of people spent effort on thinking through how this would work in a DHT context as well, so it seemed like it did get a while as a life beyond just IPNI. It also is a nice protection to be able to have when making queries that seems generally beneficial without much complexity on the client. |
I'm not disagreeing with the idea of delegated double hashed queries that having. I'm just saying that right now I'm having trouble finding a reason anyone would benefit from having a shared API for it when it's really only useful for IPNI. If the work ever lands for Amino, or someone wants to spin up a separate routing system for their network that supports double hashing then that's another story but until then I'm having trouble seeing the value.
Yes / No. If in practice you need to query both IPNI and the Amino DHT for content, but you're going to delegate your DHT queries (e.g. because you're in a browser or low resource environment) then you have some complexity in the choices that you'd need to figure out for example:
That being said, my 2c are:
|
Please move discussion to IPFS Specs |
TODOs for delegated-ipfs.dev/routing/v1
Minimum we need to switch
delegated-ipfs.dev/routing/v1
from Kubo to someguy:cc @ns4plabs @cewood lmk if there are any additional asks from bifrost infra side that would make deployment/configuration easier – my idea is to follow similar conventions as rainbow / bifrost-gateway
TODOs for General Availability
Things to do before we start recommending someguy to our users for use in their dev/prod:
README
with usage examples (cli, docker – prior art)docs/environment-variables.md
(prior art)docs/kubo.md
showing how to usesomeguy
as delegated routing for Kubo specifically (including Kubo config) – this could be linked from kubo/docs/config.md toocc @2color for visibility, feel free to flag any dx/ux pain points we should fix before GA
The text was updated successfully, but these errors were encountered: