Model refactor to handle Instances #31

Open
opened 2025-04-24 22:01:39 +02:00 by pratyush · 0 comments
Owner

Currently, we have a Game model. And a game can have a Server. Which was alright for situations say where you have a Game say Insurgency and then two Server models for that game say coop and pvp.

Without complicating into edge cases and talking game mods. We want 3 pvp servers, this model fails. port maps will need to change for the host. And the name field which is being used for the container name will collide although this is relatively simple.

There are hacky ways around this. But instead we could imagine a game. Quake 3 Arena. And you have a Server for deathmatch. But there may be different rulesets that people like and hence we want more instances. THen what about spin offs such as Rocket Arena.

HEnce it’s better to consider the Server model as a template for a server for a game. We keep container_port/proto field from the template but can map it on the host to an inherited ServerInstance model.

this is just me putting down the thoughts as they come. Should fully flesh it out. Changing the models isn’t a fun time.

Currently, we have a Game model. And a game can have a Server. Which was alright for situations say where you have a Game say Insurgency and then two Server models for that game say coop and pvp. Without complicating into edge cases and talking game mods. We want 3 pvp servers, this model fails. port maps will need to change for the host. And the `name` field which is being used for the container name will collide although this is relatively simple. There are hacky ways around this. But instead we could imagine a game. Quake 3 Arena. And you have a Server for deathmatch. But there may be different rulesets that people like and hence we want more instances. THen what about spin offs such as Rocket Arena. HEnce it's better to consider the `Server` model as a template for a server for a game. We keep container_port/proto field from the template but can map it on the host to an inherited ServerInstance model. this is just me putting down the thoughts as they come. Should fully flesh it out. Changing the models isn't a fun time.
pratyush added this to the Basic Frontend milestone 2025-04-24 22:01:39 +02:00
pratyush added the
Priority
High
label 2025-04-24 22:01:39 +02:00
pratyush self-assigned this 2025-04-24 22:01:39 +02:00
pratyush added this to the Web Application project 2025-04-24 22:01:39 +02:00
Sign in to join this conversation.
No description provided.