I have done a bunch of reading and watched a bunch of talks and yet it still blows my mind. You can just pull data from somewhere and it works.

What’s your thoughts on the future of p2p? I think a lot of companies are pushing the cloud and SaaS but really I think building an app on a more decentralized model will provide much more cost savings and reliably. I personally don’t think the idealized “dapps” or crypto will ever take off with general society but I can imagine a game or a collaboration platform that uses libp2p.

This is something I’m struggling with a bit actually.

I created a custom peer to peer networking library for an old game from the 90s. It uses an ICE (webRTC) library with a signaling server to establish peer to peer connections. I looked into libp2p but I can’t wrap my head around how a DHT would be better than my simple signaling / lobby server. Yes, you’d have lots of potential relay servers around, but I already use a TURN server provoder for my current solution that has global relays for pennies per month. And Kademlia/DHT doesn’t remove the need for a primary server somewhere because every new client needs an initial peer to connect - so I have to provide a static peer anyway. Not sure how this is any different than a server.

Anyway - I really like libp2p and want to explore the option, but that’s my experience with an alternative p2p option.

Libp2p supports a lot of different transports and does most of the work for you. For instance, libp2p can find devices on the local network via mDNS.

It is probably overkill but it is easier to use a libp2p than start from the ground up. The DHT is only one small piece and libp2p is very robust.

Follow

@pianoplant well one correction: it's not that every new client needs an initial peer, but that it needs to contact ANY initial peer.

Decentralization comes at a price. It has overhead and complexity. BUT, it also has some benefits that may or may not outweigh the costs for a particular application.

In your case, libp2p might be better than your signaling server if we worry that your server might go down. It might be better than your TURN server provider with global relays if we worry that the provider might close shop.

libp2p provides for higher levels of decentralization and less reliance on different potential points o failure.

But again, for your particular circumstance the efficiency tradeoff might simply not be worth it.

@possiblylinux127

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.