bet
bet copied to clipboard
Replace network communication layer from nng (nanomsg) to libp2p
We should consider utilising libp2p in bet
as per my understanding it will make p2p connections over different networks bit easier.
libp2p
has many different modules to cover different scenarios, one of which peer-id based connections/communication seemed interesting to me:
Here's the link to C++ implimentation of libp2p: cpp-libp2p
To add to this, atm we are the backend nodes are communicating using pub-sub, push-pull sockets.
- In pub-sub communication dealer node is acting as publisher and all other nodes in the system are acting as subscribers.
- In push-pull communication, all nodes push the info to the dealer.
This front end version of this issue is here https://github.com/chips-blockchain/pangea-poker/issues/495.
So basically the expectation is to have a system which doesn't need any static IP's in order to play the game. To start with we can create a POC where we can connect to backend from GUI using REST API's without websockets and then in the backend we use DHT for the communications.
Any ideas on this are most welcome, please feel free to ask for any clarity.