0

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.

sg777
  • 159
  • 6

2 Answers2

1

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.

tyChen
  • 1,404
  • 8
  • 27
  • Thanks for your response, since it's fully decentralized and the aim is to protect the privacy of the users. I got some documentation for DHT online, if you don't mind can you help in providing any information sources to LSD and DHT to start with. – sg777 May 11 '20 at 02:33
  • You can look at libtorrent. It is an open source project which realise bitorrent protocol and it includes LSD and DHT in it. What's more, you can browse the bitorrent specification website http://bittorrent.org/beps/bep_0014.html. – tyChen May 11 '20 at 03:10
  • thanks for the info, one last question, can a pub/sub model be fit into p2p model? Unlike p2p where each node have similar capabilities in my requirements some nodes are publishers and some are subscribers, any thoughts like can this problem be solved using p2p protocols? – sg777 May 11 '20 at 03:38
  • I think it can work. What you need to get from p2p is not the whole protocol but how to connect two peers. So you don't need to care about that. – tyChen May 11 '20 at 04:49
0

The community needs a static public ip , and all people have one . The IPs they have are not 1 IP per computer . Now days since IPV4 addresses are not alot they are using NAT ( Network Address Translation ) so PC's can have all an IP address in common within the same LAN . so your app will still be usable they IPs will be static , thus the ports used will varey . you can see more about NAT here : https://en.wikipedia.org/wiki/Network_address_translation