Using pubsub in js-ipfs for WebRTC signaling

I need WebRTC signaling and after looking around and trying many things, I’ve successfully used experimental pubsub in js-ipfs to perform it. See the tech demo at GitHub - cretz/webrtc-ipfs-signaling: Tech demo using JS-IPFS to do signaling for WebRTC. For those unaware, WebRTC requires out-of-band negotiation and there aren’t many (any?) easy approaches w/out maintaining your own signaling server or relying on a (usually commercial company). Please take a look, feedback appreciated/welcome.

(also, if anyone wants to help me figure out why, on the second part of my tech demo, js-ipfs can’t see published messages from embedded programmatic go-ipfs, I would appreciate it)

3 Likes

I’m a layman, but from what I gather the go-ipfs to js-ipfs problem is related to the two systems not being bridged 100% yet.

When I added the go-ipfs machine as a ‘Bootstrap’ for the js-ipfs config it was able to relay the pubsub correctly. Not an elegant solution, but maybe it can be worked with until something better? Even when the go-ipfs pubsub worked, it wasn’t that friendly of an output for me. Perhaps nodejs tools using jsipfs are a better route?

Trying to pubsub with the jsipfs binary gives me a ‘An internal server error occurred’ so my backup suggestion has likely failed before it begins, and here we are.

I have a project that requires a Go self contained backend and browser frontend. The bootstrap servers used in the js-ipfs side are the normal set. I am going to drop some more tests but welcome any examples anyone has communicating between the two.