Show HN: Peer-to-peer chat example built with JavaScript IPFS
ipfs.io
ipfs.io
Every message (including sign-on/-off) creates a node in the DOM tree that never gets removed. That's about 15-20 per second at the moment, so this might cause the eventual crash.
there's something I don't understand from skimming the docs: if I want to use IPFS for a project of mine, do I have to deploy a IPFS backend or there's a default I can use? it's said to be peer-to-peer so unless the peer are shared across all projects small implementation may have issues to keep availability.
edit: figured out there's a public gateway and one can also set up a private swarm. sweet!
If you want to use IPFS, you can either import IPFS as a library (which this application does, everything is P2P in the browser, by using js-ipfs and including it in the application, you can see it in the annotated source here: https://ipfs.io/ipfs/QmbZVv9q52znhF9wN6GVi55EJQYq2BR6oeTgzVn...) or you can connect to a gateway.
Please try that version instead! If moderators see this message, please update the link!
The annotated source Rhapso is talking about is here: https://ipfs.io/ipfs/QmVUvLMxTEaVBpiQBiBBdnv7ZTwt7pv8BxNhpPC...
Either you use IPNS which are pointers to other data on IPFS. Or you can use DNS to point to IPFS hashes. The results are the same, you end up with a address that can be updated.
For this example I didin't use it, as it's just a silly little example.
In any case, this is great, I've been looking for something like this.
On desktop, it's possible to use mDNS et al, we need something similar for browsers.
Please tell me more how I could use Ethereum for discovery of other peers though, sounds interesting.
This kind of app doesn't seem like a good fit for the whole IPFS idea. The same applies to Orbit.
The chat messages are being sent directly to the other party.
Why is that? I think this app fits very good with IPFS. Same applies to Orbit.