network-programmingmqttlibwebsockets

connecting to an endpoint whose IP is not public


I developed a decentralized gaming app, where players connecting to the backend from GUI using websockets. On my test environment my backend nodes have static public IP's, so I'm able to establish the websocket connections and test the game.

I'm planning to release the game to the community to test the game, but it was the case that not many have static IP's to test. So it all boils down to the situation that I feel I messed up with the design at the initial stage in using static IP's for connection b/w GUI and backend.

What I'm looking for the possibility is, say suppose if my machine is connected to the internet, is there a way I can assign some end point address to my machine and I can connect to this end point address using MQTT or any other possible way.

Can you please share your inputs on how can I overcome this problem.

Thank you.


Solution

  • One more important thing you should consider for a decentralized network is that we have many NAT devices(routers) during the Internet. So, we cannot connect to each other as we want to.

    You should do something like bt download apps have done. For example, you can have a tracker(centralized controller). If you don't want it, then DHT and LSD is what you must learn. Using these protocols, you can realise your design.