bet icon indicating copy to clipboard operation
bet copied to clipboard

Replace network communication layer from nng (nanomsg) to libp2p

Open satindergrewal opened this issue 3 years ago • 1 comments

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

satindergrewal avatar Jun 23 '21 15:06 satindergrewal

To add to this, atm we are the backend nodes are communicating using pub-sub, push-pull sockets.

  1. In pub-sub communication dealer node is acting as publisher and all other nodes in the system are acting as subscribers.
  2. 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.

sg777 avatar Oct 03 '21 13:10 sg777