Or… I suppose what I need to clarify is the communication protocol from the service/peer discovery portion. I’m confusing the question by not separating them.
That p2p http is one way to solve the communication portion. I had planned to use pubsub for that, but I could also just pipe http over IPFS using that p2p http feature. The communication part could be solved either way.
But the part that isn’t clear from that blog post, is the peer discovery, and a way for nodes to interrogate peers to discover what API endpoints (and thus features) that they offer.
Essentially what I envision is:
- A node enters a pubsub room and starts listening for other peers.
- When a new peer is discovered, it would set up a private e2ee pubsub channel between the peers.
- The node would then interrogate the peer to find out what APIs it’s running, and what endpoints of that API that it can interact with.
Example: A wallet app, for example, could listen for peers to find the least expensive full node and indexer, which it needs to perform basic wallet functionality.
Not only is this creating incentive for participants to offer services, its creating a decentralized marketplace that makes it easy to circumvent government firewalls and geofencing.
It’s this basic peer-interrogation protocol that is the heart of the idea. I’m wondering if anything like that has been developed on IPFS?