OMGWords Migration #1033
jvc56
started this conversation in
Architecture
Replies: 1 comment 1 reply
-
My main thought about GameHistory - it should probably not be saved in the db by default.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Purpose
The purpose of this migration is improve the database representation of an OMGWords game, so that game data are more visible to queries, queries on games are more scalable and efficient, gameplay architecture is improved, and game stats are corrected and improved.
Outcomes
GORM is replaced by PGX
GORM makes it difficult to write the efficient queries we need to be able to successfully remove the game cache and still provide a fast user experience. We are also moving away from it and towards managing our own SQL queries, which will allow us to use proper transactions.
Game cache is removed
The game cache should be removed if we ever want to scale to multiple servers.
Game requests and histories are converted from binary to a more queryable format
Right now the game request and history are stored in a binary format. This makes them difficult to query using SQL.
Queries for historical games are improved
This might involved creating a separate table with just a game id, player id, and timestamp to make queries of a users game history more performant.
Game stats are refactored and recalculated
The original game stats were written very early in the development of woogles and can be greatly improved. This includes moving away from JSON heavy formats, removing stats that aren't useful or needed yet, and recalculating certain stats that might have errors.
Beta Was this translation helpful? Give feedback.
All reactions