Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Net API - Design discussion #2904

Closed
daviddias opened this issue May 29, 2018 · 2 comments
Closed

Net API - Design discussion #2904

daviddias opened this issue May 29, 2018 · 2 comments
Assignees

Comments

@daviddias
Copy link
Member

The same way that the dag API is the IPLD API, we should have a Net API that is the libp2p API. This follows proposals such as https://github.com/ipfs/interface-ipfs-core/issues/249 and the need from apps such as PeerPad to actually have access to libp2p APIs and today it is accessing IPFS internals (antipattern).

This means that a) we would remove the ipfs swarm APIs, change the scope of the PubSub API and create a new ipfs net with commands such as (example of potential calls):

  • ipfs.net.dial
  • ipfs.net.hangup
  • ipfs.net.pubsub.publish
  • ipfs.net.pubsub.subscribe
  • ipfs.net.pubsub.ls
  • ipfs.net.peerRouting.findPeers
  • ipfs.net.contentRouting.findProviders
  • ipfs.net.contentRouting.provide
  • and so forth..

FAQ:

  • Why net? - Comes from Network. IPFS exposes a Network API and uses libp2p to do so.
  • Why not p2p? - calling something ipfs.p2p sort of implies that everything else is not p2p, it also doesn't communicates correctly why some commands are under the p2p scope. The word Network/Net does a better job.
@daviddias daviddias changed the title Net API Net API - Design discussion May 29, 2018
@magik6k
Copy link
Member

magik6k commented May 29, 2018

Why not p2p

go-ipfs also implements experimental feature which allows to forward libp2p streams to/from network connections under ipfs p2p - https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#ipfs-p2p / ipfs/kubo#4929 (and it too would fit in net. api)

@achingbrain achingbrain transferred this issue from ipfs-inactive/interface-js-ipfs-core Mar 10, 2020
@SgtPooki SgtPooki moved this to 🥞 Todo in js-ipfs deprecation May 17, 2023
@whizzzkid whizzzkid assigned achingbrain and unassigned whizzzkid May 24, 2023
@achingbrain
Copy link
Member

Closing as not planned.

@github-project-automation github-project-automation bot moved this from 🥞 Todo to ✅ Done in js-ipfs deprecation Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
Development

No branches or pull requests

4 participants