this document describes all the access patterns in dynamodb and how they are modelled.
GitHub has no mermaid support =( install this plugin to fix it
erDiagram
Mythicplus-Log }o--o{ Player : has
Player ||..|{ Class : has
Class ||..|{ Active-Specc : has
Mythicplus-Log ||--|{ Mythicplus-Dungeon : has
Mythicplus-Dungeon ||..o{ Level-2-Affix : has
Mythicplus-Dungeon |o..o{ Level-5-Affix : has
Mythicplus-Dungeon |o..o{ Level-7-Affix : has
Mythicplus-Dungeon |o..o{ Level-10-Affix : has
Level-2-Affix {
int id
string name
}
- access m+ log overall damage/overall healing by CombatlogHash
- PK: LOG#KEY#<combatlog_hash>#OVERALL_PLAYER_DAMAGE
- SK: LOG#KEY#<combatlog_hash>#OVERALL_PLAYER_DAMAGE
- healing
- PK: LOG#KEY#<combatlog_hash>#OVERALL_PLAYER_HEALING
- SK: LOG#KEY#<combatlog_hash>#OVERALL_PLAYER_HEALING
- same pattern for every other type
- sort m+ log by highest key and by time
- PK: LOG#KEY#
- SK: <key_level>#<time_as_percent>#<combatlog_hash>
- sort m+ log by highest key per dungeon and sorted by time
- GSI1PK: LOG#KEY##<dungeon_id>
- GSI1SK: <key_level>#<time_as_percent>#<combatlog_hash>
- sort m+ log by highest key per dungeon per affix and sorted by time
- same, but filter with filter expression. because it is a rare pattern
- sort m+ log by highest key per dungeon per specc/class contained and sorted by time
- same, but filter with filter expression. because it is a rare pattern
- check for duplicate combatlog by combatlog hash
- PK: DEDUP#<combatlog_hash>
- SK: DEDUP#<combatlog_hash>
- get best m+ log from each dungeon for a player
- PK: DUNGEON#PLAYER#<player_id>
- SK: <dungeon_id>#<time_per_cent>
- limit 1 and do for every dungeon
- do it in parallel in go and fuse result back together
- get all m+ logs for a dungeon for a player per season
- PK: DUNGEON#PLAYER#<player_id>
- SK: <dungeon_id>#<time_per_cent>
- paginate to get all keys in 1 request
- sort player m+ logs by most recent
- PK: PLAYER_ID#<player_id>
- SK: <created_at>
- get player via player_id
- PK: PLAYER_ID#<player_id>
- SK: PLAYER_ID#<player_id>
- search by player name
- PK: PLAYER#SEARCH
- SK: <player_name>
- add player id as attribute, so the follow-up requests can search by player id and not player name, to avoid rename problems
Patterns | PK | SK | GSI1PK | GSI1SK | GSI2PK | GSI2SK | GSI3PK | GSI3SK | GSI4PK | GSI4SK |
---|---|---|---|---|---|---|---|---|---|---|
1. | LOG#KEY#<combatlog_hash>#OVERALL_PLAYER_DAMAGE | LOG#KEY#<combatlog_hash>#OVERALL_PLAYER_DAMAGE | - | |||||||
2-4 | LOG#KEY#season | <key_level>#<time_as_percent>#<combatlog_hash> | LOG#KEY##<dungeon_id> | <key_level>#<time_as_percent>#<combatlog_hash> | - | |||||
6. | DEDUP#<combatlog_hash> | DEDUP#<combatlog_hash> | - | |||||||
7+8 | DUNGEON#PLAYER#<player_id> | DUNGEON#PLAYER#<player_id> | - | |||||||
9. | PLAYER_ID#<player_id> | <created_at> | - | |||||||
10. | PLAYER_ID#<player_id> | PLAYER_ID#<player_id> | - | |||||||
11. | PLAYER | <player_name> | - |