Comment by canadiantim

2 years ago

Can you recommend some p2p technologies that people can start building with today?

Eg I’m tempted to go with a stack of a centralized Postgres with a SQLite for each user (a la Electricsql, mvsql, etc.) because I want users to have their data local as much as possible (in their own SQLite db) but a centralized Postgres database still feels logistically necessary to coordinate eg user accounts and sharing.

I’m all ears on better p2p solutions. I’ve looked into things like eg using matrix or nostr but they don’t feel like the solution I’m looking for yet. But I’m eager to find something that can keep data local and have sharing done more p2p.

We are building our overlay network with libp2p

Our current gossip structure for identity is a hash tree. The secure scuttlebutt research paper by Tarr is a good place to start for that.

For capabilities, we are (currently) using the same concepts as UCAN.

  • If I may be so bold, Cult of The Dead Cow could very well be interested in this space with their most recent private-first platform framework.

    • I'm really interested in what they announced at DefCon, but their current website doesn't really give me insight into what's novel about their approach.

      I'm sure they're doing a lot of cool stuff - it's just I have no idea what that stuff is.

Couchdb/pouchdb remains one of the best: it's super easy to setup and is production-ready, but it's gonna be json docs with no transactions, so it can be limiting.

Y.js and automerge emerged as solutions combining CRDTs and content transfer, they look really promising. There is a Y.rs version if that's better for you.

I've always dreamt of building something on top of Syncthing, ie something that would use file synchronization. It's more versatile and will definitely last longer than anything else, and it has some built-in capabilities for having a third party helping transport but not being allowed to read content.

I recently came across https://github.com/superfly/corrosion , a service discovery and state management tool that is working completely p2p. CR-SQLite, in particular, allows multiple tables from multiple databases to be merged thanks to CRDTs. I'm sure there's a lot to build on top of it.

I feel like you're not really interested in full p2p but want some centralization point to manage some auth stuff, so I'd investigate couchdb/pouchdb first.