kepic's ramblings

WebRTC

A #p2p social media platform. We have federated ones, like #fediverse and #hubzilla, and truly p2p like #twister — but none of these are really accessible. All of them require a dedicated server.

So I got to thinking. We have a multitude of technologies at our fingertips that seem to imply that going serverless is possible. Well, when I say serverless, I mean without a dedicated server for the platform. Ideally the site, P2P connections and all, will run in a browser, which implies there's an #Internet site.

With #webtorrent (or something similar) we could share media content, or probably something akin to a bootstrap file, and #IPFS is an obvious alternative. #WebRTC makes direct browser-to-browser connections possible (and WebTorrent is built on it). #IndexedDB offers local storage for personal content, which could then be offered to other users over other means.

Sadly torrents are immutable, so they are not optimal for this kind of content delivery, assuming functionality similar to Twitter/Facebook. IPFS could help here, too.

Another possible problem is user identification, but I'm pretty sure there's something that can be done. A traditional user/password -pair is of course an obvious choice, but encryption keys or OpenID-like solutions shouldn't be overlooked either. Hubzilla has an interesting implementation for authentication.

So what do we need? Essentially everything would come together in a Progressive Web App. A #PWA can be run offline, so all assets can be loaded to the browser, be it on mobile or desktop. It also means that it essentially requires nothing but #HTML, #CSS and #JavaScript. It could therefore be served from any hosting service, as all computation and storage are client-side.

Another problem to solve would be federation. Would this kind of p2p platform be able to join the fediverse? Fediverse runs on dedicated servers and I have to assume that a central location for a server to poll is a necessity. Since we don't want to run a dedicated server of any kind, would it be possible for the network to trade information with a fediverse server?

One answer is to build the compatibility into fediverse. #Friendica and #Hubzilla are easily extensible, and others can implement the feature if they want — and for some it's probably possible to implement it by user (I'm looking at you, #Misskey).

Peer discovery is of course a problem in a system like this. We could probably bootstrap it from the website that works as the home (or not, Hubzilla channels could work well here to allow migration), but, again, there is IPFS with its already-existing p2p network and storage. #IPNS is something that would probably work wonders here.

Oh, and apparently IPFS now has a browser implementation in JavaScript.

Wheels are turning in my head…


I'm on Mastodon, Facebook, Twitter, and Friendica. I also have a web page.