Hacker News new | ask | show | jobs
by sliken 1302 days ago
Years ago, most computing devices were desktops. They often had a routable IP address, unlimited power, and would happily sit passing packets all day. This made things like a DHT practical, so you could find your other peers. This made things like the early days of skype where except for auth, chat and file sharing was p2p. After being online for long enough and having a routable IP, you could become a supernode to help less fortunate nodes talk to each other.

These days a much larger fraction of computing devices are on battery, on expensive networks like cellular, and can't really tolerate being part of a DHT. Increasing use of NAT/Masquerading makes a harder (and a support nightmare) to accept incoming packets from new peers.

One solution to this is to add a "superpeer" to a router distribution like OpenWRT, or sell the "plug/wallwart" to help. That way a cheap (under $100) computer could build reputation with it's peers, accept incoming packets form new peers, provide some storage, and keep up with DHT maintenance. Then low power and/or expensive network peers could just check their "home" superpeer and get what they need quickly with minimal bandwidth and power.

2 comments

NAT was the problem since near beginning of P2P tho

> One solution to this is to add a "superpeer" to a router distribution like OpenWRT, or sell the "plug/wallwart" to help. That way a cheap (under $100) computer could build reputation with it's peers, accept incoming packets form new peers, provide some storage, and keep up with DHT maintenance.

...and do what exactly ? Don't have CPU power to do much, dont have storage to serve anything.

Also the same problems of "how do I exactly connect thru NAT" home router in same way, some of them might have IPv6 directly, but most are still behind some carrier grade NAT just like the phones are.

But I do like idea of evolving router a bit. Stuff like home automation should ideally just talk to MQTT queue on a router and then user is free to either install automation using it somewhere on the network, connect directly from phone, install container on the router running HomeAssistant or something, or pay some cloud service to ingest the MQTT stream and give them nice UI for it.

> and do what exactly ? Don't have CPU power to do much, don't have storage to serve anything.

My new $140 router had 8 cores (4xA76 + 4xA55), 8GB ram, 32GB eMMC storage, and 2x2.5gb+gbe ports. Even has a SD slot for more storage. My thinking is more along the lines of what can't it do. The low hanging fruit would be to replace maps.google.com (with p2p shared openstreemmaps or similar), drive.google.com/dropbox.com, chat/blog/twitter/instagram/snapchat/facebook and similar low hanging fruit. If you need more storage a 256GB sd card is $25 to $40. I believe the default storage for most google accounts is 17GB.

With a healthy P2P ecosystem you could leverage your peers, things like FileCoin could let you supplement your storage from any provider, and not depend on any single provider.

Running SHA256 on files, even reed-solomon, keeping track of your DHT peers, running IPFS or similar, even mastodon (once implemented in Go or Rust) shouldn't make newish hardware work hard.

Being in the router avoids the NAT issue, and if this kind of thing gets any traction. Anything outside the router will need working IPv6 (like Comcast in the USA), an accommodation from the router with port forwarding, or one of the various NAT traversal protocols like ICE, TURN, or STUN.

I agree that a pool of equal peers is tough these days. I think the Fediverse has a pretty good approach, where most end users are on mobile but you can spin up a server whenever.

There’s still a big complexity/skill/cost jump from “I toot from my iPhone” to “I run a mastodon instance for my company” though. Some of that can be addressed by managed hosting. It’s probably preferable to have a “super peer” though. In my mind, a superpeer runs the same software as a peer, but does more work because it can. It should be easier to maintain than a full server. I’m taking about the difference between:

A) manage a mastodon node, with its own redis, PostgreSQL, web server, object storage, etc

And

B) run BitTorrent in the background on your gaming PC to seed the latest cut of the niche documentary you’re working on

There’s a lot of interesting self-hosting projects happening, but they tend to focus on helping you run kubernetes or a similar container orchestrator. That’s still way more complex than an executable.

I think we need things to get a bit more opinionated again…

Agreed. Supernodes should be near zero admin, and be able to run where advantageous, not just where an expert is available. OwnCloud/Nextcloud running every more services and at least looking at fediverse integration. Various NASs allow local applications for photos, plex, etc. All targeted at being nearly turnkey and friendly to the average consumer.

Ideally things become easy enough that people can depend less on FAANG and do more with services that are distributed. Hopefully the software can get to the point where your server helps when it can, but if it's down other servers would help out. I just bought a $120 ($140 with case) router, 8 cores, 8GB ram, 32GB storage, GigE + 2x2.5gbe. I've love to dedicate it for messaging, filesharing, mastodon, photo storage/viewing/sharing, etc and even have it exchange services with others so that message/photos/whatever can be shared even if it goes down. Hopefully it gets there, pretty amazing resources are available cheap these days. I'd happily trade 2/3rd of my resources for other peers ... if they did the same for me.