Hacker News new | ask | show | jobs
by olah_1 987 days ago
Would a more p2p system ever be possible? Just choose the host and their client is the one that orchestrates? Then you’d just need a proxy to connect users?

My understanding with WASM is that you can run full desktop applications in the browser. Wouldn’t that mean you could include the server as well?

1 comments

It's possible but it gets complex really quickly. Just running the server in the browser is the easy part ;)

Having a selected host on one of the clients (as you mentioned) could potentially work, from network topology point of it wouldn't be much different from hosting a native server on their computer. There is a few cons to this approach:

1. We become limited on that person's uplink. First bottleneck will be bandwidth as they have to send all data to everyone. Secondly it's very difficult to ensure reasonable latency in this setup (it's already difficult with dedicated servers). Thirdly they have to be reachable by all other players (NAT/firewall headaches).

2. We rely on that person's computer and network to be up for the duration of the game session. We could try to migrate game server to another one if there are problems but again this becomes really complex really quickly.

3. Cheating. Not something we are worried at this stage but having a game hosted on one of the player's machines opens it up for abuse and might give a slight advantage to that player (starting with extremely low latency).

So that's when we compare running a non-dedicated server on one of the client's nodes. If we were to venture to pure P2P then it brings another set of challenges like state synchronisation.