r6db / app

https://r6db.app
MIT License
15 stars 3 forks source link

User stats monitoring #7

Open NaughtyMuppet opened 6 years ago

NaughtyMuppet commented 6 years ago

Idea is to start monitoring the stats for user, take a snapshot in the beginning, and while running, it scans for operator stats.

If operator win/loss increases we know that that round ended and we can check casual wins/losses and ranked wins/losses to know if the match ended. From this we can write entries into round/match/session tables.

williamjohnstone commented 6 years ago

How frequently will we be requesting the stats to check if there is a change?

LaxisB commented 6 years ago

i'd propose to have 2 kinds of monitoring:

profile

this just makes complete snapshots every now and then (app start/end maybe) then we'll end up with the same kind of stats as the website before

matches

here we can probe the operator stats every minute or so to check if something changed. if it changed -> round ended and we can diff the stats to get the round k/d/playtime/operator it didn't change -> might just be a time issue it didn't change for 2 checks -> the match ended and we can build some object off of it

edit: assuming of course that the endpoints update quickly enough