chips-blockchain / pangea-poker

This is the reference GUI for Pangea Poker, blackchain based decentralised game.
https://chips.cash/
25 stars 16 forks source link

Replacing the websocket communications with REST API calls #495

Open sg777 opened 2 years ago

sg777 commented 2 years ago

Currently, the GUI is connecting to the backend using websockets. In the backend I'm using libwebsockets to run the webserver to which the GUI needs to be connected during the game.

So, ideally, when the user enters the dealer hosted uri on the browser, the user gets the interface to play the game. In order for the user to connect to the backend, the user has to enter the backend node IP address and then a websocket connection is established between the GUI and backend and further game communication happens through this WS connection.

Since, its not ideal to ask the user to have the backend node running on the static IP, we moving away to remove the dependency on this static IP part. For these reasons we are exploring what possible ways a player from the GUI can connect to the backend node without enforcing the user to run the backend node on the static IP.

Can anyone expertise on this, please share your thoughts on how we can achieve this?