HNHacker News
TopNewBestAskShowJobs

p2pchatter

51 karma · joined January 22, 2018

submissionscomments
p2pchatter··on Show HN: Peer-to-peer chat example built with JavaScript IPFS
No, you clearly didn't read the annotated source that is linked both from the application and various comments here on this submission.

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.

p2pchatter··on Show HN: Peer-to-peer chat example built with JavaScript IPFS
What is the difference? You can host files on IPFS just as you can share files.
p2pchatter··on Show HN: Peer-to-peer chat example built with JavaScript IPFS
Would have been easy to fix, if this wasn't a demo.

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.

p2pchatter··on Show HN: Peer-to-peer chat example built with JavaScript IPFS
Thanks! Exactly what I was thinking and it's much nicer when you can actually learn from the examples!

The annotated source Rhapso is talking about is here: https://ipfs.io/ipfs/QmVUvLMxTEaVBpiQBiBBdnv7ZTwt7pv8BxNhpPC...

p2pchatter··on Show HN: Peer-to-peer chat example built with JavaScript IPFS
Not sure how that would work. You would have to make some transaction on the Ethereum network for other peers to discover you, correct? That kind of makes the barrier to entry a lot harder.

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.

p2pchatter··on Show HN: Peer-to-peer chat example built with JavaScript IPFS
Already possible, check out the input in the bottom left. Not very obvious, but it's there already.
p2pchatter··on Show HN: Peer-to-peer chat example built with JavaScript IPFS
Yes, system messages got in the way. Try this version without them: https://ipfs.io/ipfs/QmbZVv9q52znhF9wN6GVi55EJQYq2BR6oeTgzVn...

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.

p2pchatter··on Show HN: Peer-to-peer chat example built with JavaScript IPFS
No, there is no global database. You just share hashes that you know about, so no matter how many hashes there is, IPFS will still be the same speed.
p2pchatter··on Show HN: Peer-to-peer chat example built with JavaScript IPFS
Seems to be a bug with js-ipfs or just a lot of DOM nodes... Not sure how to fix.
p2pchatter··on Show HN: Peer-to-peer chat example built with JavaScript IPFS
Hello again everyone! Seems like a lot more people joined the chat and the system messages are kind of getting into the way. I've released a updated version here: https://ipfs.io/ipfs/QmbZVv9q52znhF9wN6GVi55EJQYq2BR6oeTgzVn...

Please try that version instead! If moderators see this message, please update the link!

p2pchatter··on Show HN: Peer-to-peer chat example built with JavaScript IPFS
Hello, I made this! Please try it out and tell me what you think. Annotated source is public here: https://ipfs.io/ipfs/QmVUvLMxTEaVBpiQBiBBdnv7ZTwt7pv8BxNhpPC...