1 個回答
- 最新
- 最多得票
- 最多評論
1
DynamoDB would not be my go-to for a leaderboard, as other better alternatives exist. But i'm assuming here that you want to use a single database (DynamoDB) for your entire application....
While your first access pattern is highly efficient, your second one may not be as scalable. Imagine 1M players played the game Meteor Blasters
and your rank is last place, you have to read 999,999 items to understand where you are in the list. That's going to be slow and expensive.
I would consider updating the users game rank on a daily basis for example, especially if they are not explicitly asking for it and its just used to populate a dashboard.
相關內容
- 已提問 4 個月前
- AWS 官方已更新 1 年前
- AWS 官方已更新 3 個月前
- AWS 官方已更新 3 個月前