Disclaimer
-
I’m not looking for code snippets or API references from specific implementations of
libp2p
, I’m just interested in having a worthwhile discussion so I can better brainstorm how I want the architecture for my project. -
I’m also not interested in blockchain, or crypto seeing as how
libp2p
does seem to have a somewhat dominant use case in those topics. -
I’m also not creating an FPS, so low-latency RTTs and/or high tick rates are more of a luxury feature in my current context.
-
I plan to make primary use of the QUIC transport since I’ve seen some (non-libp2p) projects make use of it in real-time applications before, instead of using UDP with some homemade spice to make it a good fit for real-time games.
Realtime games
I’m invested in developing a game that needs worlds to sync in real-time, and I first want to know if anyone that has worked with libp2p
knows that it can handle more than creating chat and/or file sharing apps. I only ask that because every Google search ends up talking about IPFS or other popular p2p/federated social platforms.
My current thoughts, and digging around in documentation have led me to three “backbones” of the architecture if you will; Rendezvous, Gossipsub, and Kad-DHT.
Rendezvous
Their prominent role is the “entry-point” for users to connect to and use the public network, finding joinable worlds, online users, etc…
Gossipsub
Possibly a more odd use-case for this protocol, using “Topics” as worlds that users “Subscribe” or join/connect to, and those users can “Publish” the changes they make to the world (i.e, an object they moved, a synced variable they changed like a boolean, etc…)
Kad-DHT
A distributed store of joinable worlds/topics, online users, available circuit relays, etc…
My main question
Is any of what I’ve written here a reasonable use case of libp2p
and its protocols? The main thing that I’m possibly overthinking is if I’m going a little too outside the box in what I could use Gossipsub for, mainly the real-time world syncing, even if I were to make use of data compression before sending said data.
However, if you know, or believe it’s theoretically possible as a use case for libp2p
, I’m also trying to find any papers on creating some form of “user profile” system that could be used in a p2p context, seeing as I want to allow users to add friends, and have some form of social presence on the platform so users can easily connect without the need for 3rd-party apps to communicate what their new PeerID is after they reconnect to the network.
Social features
As brought up before, I’m trying to find research or talks about creating user “profiles” that users/peers can use to easily find each other over the network without having to communicate what their new PeerIDs are when they reconnect to the network.
My initial thought is to make use of Kad-DHT as a distributed database for holding basic user social info, however, that brought up the question of how that data is protected, and if I could make use of a more convenient username and password method of gaining access to that data.
Of course, this is all coming from the idea I have that it’s probably not good practice to not generate a new keyring every time a peer wants to reconnect to the network. However, if that’s not the case, that could simplify everything regarding user profiles.