True. But you can do it both ways. You can do relays with peer restrictions or p2p with optional relays. (In which case a relay is just a peer with lots of resources. E.g. a static IP and permissive filters.)
You want to have both. I think it makes sense to start with p2p and add relay features, mostly so all the authentication encryption etc just works.
It is a bit more of a pain to add it to an existing open relay protocol without leaking metadata.
Likewise it is a bigger pain to code for the base protocol of a p2p system because all the data you want is encrypted and routing is a pain.
It is just a matter of where you like your pain.
I like nostr because you made the practical choice to make it possible to code for. Very bold of you.
But I also want to see if I can get there from the other direction. It might actually be simpler in the long run. But I admit getting adoption and making it convenient for developers is.... A long shot at best.
Login to reply
Replies (2)
What is the difference between p2p and client-server? What people mean by p2p has always been multiple things, and it clouds my thinking when trying to reason about what people are saying.
Every network connection has an initiator. If we call that side the client, then every network connection is client-server... so p2p is not an alternative architecture to client-server, but just some subclass of client-server.
Maybe p2p means that the server is in your house, instead of in a data centre. Or that technically, it is behind NAT and maybe not Internet exposed. In that case holepunching tech might be useful. This comes up a lot. I would drop the term p2p and just say that sometimes relays are behind NAT and maybe we need a holepunching spec.
Maybe p2p means that every server must also be a client, and vice versa, and then you call them "nodes". This seems to be an unnecessary additional constraint on what people can do. I think the server and client components should always be separable. I can't think of a reason to force them together.
This is the extent of my thinking on p2p. If I missed something about what makes p2p distinct, please mention it so I can integrate it into my thinking.
All I mean by peer-to-peer is that there are no special nodes in the graph. I don't really care about the implementation. I only care that things function between 2 isolated users in the same manner that it functions in a fully connected graph.
In some sense that means that every node is a client/server combo but that doesn't mean there are no other connections or that the permissions set on the node can't make it function as a relay, STUN server, or TURN server.
Maybe it is just better to say decentralized but that term might be more overloaded that peer-to-peer.