lundi 2 février 2015

Getting/Updating A Counter in DynamoDB

Architectural question. As part of a game, we were looking at keeping track of number of items that have been completed across all players. No problem keeping track of a players status, dynamo shards nicely across the users. But if I want a single number that shows how many of X have been processed, then I'm talking about a single row table, which means everyone how is updated and retrieving from that table is hitting on exactly the same row. I'm pretty sure Dynamo will take a lot of this, but I'm wondering how well it will scale. As each person performs a function, the counter would increment, and then they would read it back.


I'm thinking we could keep the counter in memcache or Redis, and update it when a new item is classified, and rebuild it on a nightly basis. This seems like overkill, and requires extra infrastructure.


Any thoughts? Has anyone done this successfully? Dynamo keeps track, but the number they return can be six hours out of date.





Aucun commentaire:

Enregistrer un commentaire