peer-2-peer network: now with diagrams!
Posted: Sat Apr 24, 2021 5:26 am
I'd like to set up an adhoc p2p network of Love2D 'agents' that has no central server, and allows agents to drop in and join that network adhoc.
For experimental purposes, the Agent can join the network, send and receive 'chat' messages (e.g. social network), and then disconnect. Messages sent while disconnected are lost.
I'm thinking of using gossip protocol to disseminate messages. Speed, performance and reliability are not important.
An Agent that joins the network would first join to an advertised or known node. This node might change overtime and might be advertised on DISCORD or TWITTER or whatever. Point is, you can't join the network until you have a known entry point.
Getting to the real question: using love2d enet, how would I establish hosts/clients if I want every agent to connect at least three neighbours so the gossip protocol can be effective?
Bonus question: once the Agent first joins, how should they discover other neighbours, join with those neighbours and strengthen the gossip protocol?
I have spent the last few days looking into enet, sockets, grease etc so I'm no expert but I think I know the basics. All the tutorials show one client connecting to one server. I'm after many clients connecting to many other clients (no server).
For experimental purposes, the Agent can join the network, send and receive 'chat' messages (e.g. social network), and then disconnect. Messages sent while disconnected are lost.
I'm thinking of using gossip protocol to disseminate messages. Speed, performance and reliability are not important.
An Agent that joins the network would first join to an advertised or known node. This node might change overtime and might be advertised on DISCORD or TWITTER or whatever. Point is, you can't join the network until you have a known entry point.
Getting to the real question: using love2d enet, how would I establish hosts/clients if I want every agent to connect at least three neighbours so the gossip protocol can be effective?
Bonus question: once the Agent first joins, how should they discover other neighbours, join with those neighbours and strengthen the gossip protocol?
I have spent the last few days looking into enet, sockets, grease etc so I'm no expert but I think I know the basics. All the tutorials show one client connecting to one server. I'm after many clients connecting to many other clients (no server).