I wanted to make a decentralized social network on IPFS, but I encountered the problem of communication.
I suggest creating in Gateway the ability to create direct streams with peers. PubSub is no good for this.
How the feature should work
Web site makes a request to the gateway A to establish connection to the peer B. During connection establishment, authentication with the public key is performed.
To transfer data from the stream to the site, websocket is used, which contains packets with unique identifiers.
Scuttlebutt uses a standalone application to communicate. I suggest establishing direct streams in browser. Use experemental feature Libp2pStreamMounting isn’t for me, because users will not change settings. I suggest developing this feature.
@GeorgeBartolomey, you seem to have a very just-do-my-homework attitude.
Why applying the go-ipfs tag if you are interested only in browser? A basic research would have tell you that direct connections in browsers are possible via either webRTC or webSockets in libp2p. I’ll let you research first.