Buliding an in-browser distributed app over helia - messaging and pubsub

I’m writing an implementation for a p2p matching app (e.g. tinder) and I’m looking at Helia as a database and possibly communication solution (been following libp2p for years now).

I see it has a react browser example with vite, which is great, and I assume it actually works.

I basically have all the parts except I need:

  1. a way to distribute profiles, which I thought to do using some gossip or pubsub
  2. a way to send messages between peers that know each other’s other’s public adresses.

my questions:

  1. What assurances does one have of storing something using helia? in other words - can I expect a certain data retention, or can I ensure it by paying somehow?
  2. Can I use helia as a pubsub to distribute profiles? in this scenario will peers be required to broadcast their profiles periodically or once is enough?
  3. Can I use helia to send messages between peers? (not big files, just short programmatic updates)
  4. is https://polybase.xyz/ also a good choice? does it work in the browser? how is it different?


  1. Data stored in a Helia node (like any IPFS node) will stay in the Helia node unless explicitly requested by another node. You can pay a pinning service such as https://web3.storage to retain the data.
  2. You can use libp2p’s pubsub to distribute protocols. Depending on your design protocols will have to be re-transmitted sometimes, unless other peers help with the redistribution of profile records.
  3. Helia runs on top of libp2p, and you can use the same libp2p connections to use PubSub for sending short messages (or whichever libp2p feature you’d like to use for this).
  4. Sorry, I have no idea how PolyBase works.
1 Like

A good demo you may want to look into is at GitHub - libp2p/universal-connectivity but you should also be aware of [🏆 Golden path scenario] Browser-authored contend retrievable by another machine through the ipfs.io gateway directly · Issue #182 · ipfs/helia · GitHub which is currently tracking the hindrances of native authoring and contributions to the IPFS network with Helia

1 Like