ipfs-pubsub-room icon indicating copy to clipboard operation
ipfs-pubsub-room copied to clipboard

Non-Local Usage

Open agahEbrahimi opened this issue 7 years ago • 6 comments

Hello,

Does pubsub-room or the demo in the video work with two different computers on different private networks or does it just work on a private network or a singular computer?

Thank you

agahEbrahimi avatar May 18 '18 04:05 agahEbrahimi

Yes, it works with two different computers on different private networks.

WesleyDRobinson avatar Oct 20 '18 05:10 WesleyDRobinson

Hey, if I understand correctly, room needs to use libp2p-webrtc-star in order to work. libp2p-webrtc-star uses a rendezvous server in order to let nodes talk to other nodes. Considering this, I don't understand how can all this be decentralized. If the rendezvous server goes down, nothing works anymore, right? Am I missing something? Or my assumption about decentralization is wrong?

PierfrancescoSoffritti avatar Dec 06 '18 19:12 PierfrancescoSoffritti

Although this is a generic aspect of IPFS / libp2p, I think I can clarify a bit:

You can use whichever transport you configure your IPFS node with.

Currently, for the browser platform, 2 main transports exist: webrtc-star and websocket-star. Both use rendezvous servers. But nothing dictates that this node only has one address. You can bind to as many rendezvous servers as you want, and thus gaining some redundancy.

(In the node.js environment you have different transport choices, with different infra-structure requirements).

pgte avatar Dec 06 '18 19:12 pgte

Thanks for the clarification @pgte.

I would like to ask you a few questions, this probably isn't the best place to do it, but I wouldn't know where else to ask. If you don't have time to answer: no problem. Don't want to abuse your time :)

I am quite new to IPFS, I'm still trying to understand how everything comes together. I am mostly interested in the decentralization aspect and I don't have a clear picture of how that works, yet. Is there always one or more rendezvous servers in the middle? I have seen a demo of the distributed file system, from what I understood it didn't have rendezvous entities in the middle. If not, how do nodes find each other?

I am currently working with node, not in the browser. You mentioned that there are different transport choices there, could you point me to resources relative to that?

Is there any comprehensive resource where I can read more about how everything works?

thanks in advance!

PierfrancescoSoffritti avatar Dec 06 '18 19:12 PierfrancescoSoffritti

In the IPFS constructor you can specify which addresses and transports you want in options.libp2p: https://github.com/ipfs/js-ipfs#optionslibp2p

In node it default to this libp2p config: https://github.com/ipfs/js-ipfs/blob/master/src/core/runtime/libp2p-nodejs.js

And these addresses: https://github.com/ipfs/js-ipfs/blob/master/src/core/runtime/config-nodejs.js

The libp2p packages you can use are listed here: https://github.com/libp2p/js-libp2p#packages

Hope this helps!

pgte avatar Dec 06 '18 20:12 pgte

Great, thanks a lot!!

PierfrancescoSoffritti avatar Dec 06 '18 20:12 PierfrancescoSoffritti