1 Answer
- Newest
- Most votes
- Most comments
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.
Relevant content
- asked 2 years ago
- asked 2 years ago
- asked 17 days ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a month ago