GlowieXYZ / GDCSST

Digital Combat Simulator Server Tracker written in Go
GNU General Public License v2.0
0 stars 2 forks source link

Keep track of past scenarios. #11

Open GlowieXYZ opened 3 years ago

GlowieXYZ commented 3 years ago

In the python version had past scenarios in the frontend if you viewed a server. This was a nice feature but was an extremely expensive on server resources. I would like to implement this again, but have entries expire. Not sure if I can do this with redis or if I need to do some scripting for this.

So its research and implement.

GlowieXYZ commented 3 years ago

Redis isn't going to help us, so we'll have to do it our self.

    type scenario struct {
        MissionName string
        Players     int
        MissionTime int
                Age int
    }
    var scenarios []scenario

Use this as a base and write code to maintain and prune this.

GlowieXYZ commented 3 years ago

Nope, the struct needs a start and end timestap for the scenario.