Skip to content
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

Expose libp2p-style content/peer routing API? #378

Closed
achingbrain opened this issue Jan 12, 2024 · 0 comments · Fixed by #372
Closed

Expose libp2p-style content/peer routing API? #378

achingbrain opened this issue Jan 12, 2024 · 0 comments · Fixed by #372

Comments

@achingbrain
Copy link
Member

Small glossary:

  • Helia API - the interface implemented by helia, @helia/http and maybe others one day. It exposes a .libp2p property.
  • helia an implementation of the API that uses libp2p
  • @helia/http an implementation of the API that (in theory) only uses HTTP gateways

This is in reaction to #372 where we have an implementation of the Helia API (so it's compatible with @helia/unixfs, @helia/dag-cbor, etc) that doesn't use libp2p and does everything over HTTP.

Modules like @helia/ipns use the ContentRouting and PeerRouting interfaces from libp2p via the Helia API to do things like look up records or find providers for content.

We have modules like @helia/delegated-routing-v1-http-api-client which implement one or both routing interfaces but only over HTTP.

If the Helia API exposed the Content/Peer routing APIs then helia could call through to libp2p and @helia/http could call implementations like @helia/delegated-routing-v1-http-api-client. Block brokers could use this to find HTTP block/car providers in the routing.

We could probably remove libp2p from the Helia API then - helia would be free to add it back in to expose it for anyone who wants to drop down to a lower level.

cc @ipfs/helia-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant