Understanding the peer-star-app

Hi, I follow the workshop-todo-app and try the understand the peer-star-app. Here is a few questions:

  1. Does peer-star-app init its own js ipfs daemon?
  2. I could see that peer-star-app use circuit relay. Is it intended to connect to a better peer(ipfs node) to get better connectivity and performance?

Thanks.

Hi bjzhang!

  1. Does peer-star-app init its own js ipfs daemon?

Yes, it runs its own js ipfs daemon, but it only uses a subset of the features. Some features that are in go-ipfs, like DHT and IPNS, are still experimental or not fully implemented yet in js-ipfs, and arenā€™t used by peer-star-app.

  1. I could see that peer-star-app use circuit relay. Is it intended to connect to a better peer(ipfs node) to get better connectivity and performance?

I think thatā€™s the idea. I havenā€™t tried using that myself yet.

Iā€™m most familiar with how peer-pad is using peer-star-app ā€¦ right now, itā€™s using a standalone websocket ā€˜rendezvousā€™ server (libp2p/js-libp2p-websocket-star-rendezvous) that all the peers connect to. Thatā€™s a little more centralized than weā€™d like ā€¦ there are some ideas to build some of the core ā€œrendezvousā€ protocols into ipfs itself. We also want to support transports such as webrtc that will take advantage of true peer-to-peer connections where the are available.