WIP: Session Statistics Prototype #10
Reference in New Issue
Block a user
Delete Branch "sessions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
MapID-GameIDto see total play time and attempts for mapMapID-GameID-UserIDto see play time and attempts for player on mapProblem: Sessions as proposed do not include GameID. If maps are on multiple games, such as Fly Trials (and I'd like to add surf_mail_yourself_in_a_box to bhop), they are not seperable.
Sessions could be further subdivided per-style, but that seems excessive. It's appealing in the sense that we could track how much time players spend in each style...
I've given in and added StyleID. I'm imagining a player profile page that shows your hours in each style. May as well track it from the start.
e687c190batoa3a63a8475Why is AttemptNumber part of the Times table? That introduces coupling that should be avoided. If the statistics service is the primary consumer of this field, it should likely live there instead. Keeping it in the Times table ties unrelated concerns together and reduces modularity.
It also looks like the statistics service is being set up to issue broad, generic queries, with the expectation that downstream consumers will perform further processing and aggregation. That approach scatters logic across services and weakens the role of the statistics service. Ideally, it should act as the source of truth and return data in a form as close to final as possible. Aggregating closer to the database is generally more efficient and easier to maintain.
Right now, this is still very bare bones and doesn’t show how you plan to implement each user story. I’d recommend fleshing out the actual use cases, expected query patterns, and specific data access needs before moving forward. We need to be clear on what we’re trying to solve to avoid issues later.
I'll need to ruminate on your points and flesh out my ideas for ability estimation using session data.
Writing down another consideration: if MapID and StyleID switches, it creates a new "session", but it's not actually a new session. I mentioned an idea to address this in my original post StrafesNET/data-service#32 (comment)
and extend that to when the StyleID changes too. However, session count seems like low-value data, and I already track JoinCount in the PlayerData. I'm also not fond of this idea since it's an aggregate-timeline hybrid. The only way to really get a handle on session count at different hierarchical levels (server session count, map session count, style session count) would be to switch to a pure timeline of events like "Player Joined" "Map Changed" "Player Changed Style" "Player Left" and that seems like a pain in the ass to aggregate.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.