mafintosh / messages

send me messages
8 stars 0 forks source link

P2P and Bittorrent-DHT #2

Open delvedor opened 8 years ago

delvedor commented 8 years ago

I followed your super cool talk at the NodeConfIt a week ago and I fell in love with p2p, so now I’m trying to learn more.

Yesterday you told me to search for Bittorrent-DHT for create a distributed p2p network, in my specific case I want to build a electron chat application (closed in a local network, so no internet connection) without force the clients to know the data of the other peers. I found this repo.

Unfortunately I’m a noob and I don’t understand all of what I’m reading. Have you got some example or a “tutorial” for learn how to use this protocol?

What I think I’ve understand: Reading the first example (magnet-uri), I have a unique code (the uri) and all my clients (bittorrent-dht is a server-client?) search for that code in their local network and if they find someone, I get a console.log. Am I right?

Thanks!

mafintosh commented 8 years ago

If you are in a closed local network you might wanna use multicast-dns instead like we did in the workshop. You can try out airswarm to get a auto configured network swarm.

The DHT is mostly useful if you wanna bootstrap at an internet level network. If you want I can give some pointers on how to use the DHT as well.

delvedor commented 8 years ago

Ok, I will try the airswarm module. If you have time I'd still like to know something more about the DHT, it's a very interesting argument!