chips-blockchain / bet

This repository holds the implementation code of Pangea Poker white paper: https://bit.ly/3bdCz0Z
https://chips.cash
16 stars 17 forks source link

Replace network communication layer from nng (nanomsg) to libp2p #234

Open satindergrewal opened 3 years ago

satindergrewal commented 3 years ago

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

sg777 commented 3 years ago

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.