python - How to build model in DynamoDB if each night I need to process the daily records and then delete them? -


i need store daily information in dynamodb. basically, need store user actions: userid, storeid, actionid , timestamp. each night process information generated day, aggregations, reports, , can safely deleted records. how should model this? mean hash key , sort key... need have full timestamp of each action reports in order query dynamodb guess easier save date only. have pks userid , storeid anyhow need process data each night, not data related 1 user or 1 store... thanks! patricio

you can use rabbitmq schedule jobs asynchronously. faster multiple db queries. basically, tool allows create job queue (containing userid, storeid & timestamp) workers can remove (at midnight if want) , create reports (or whatever heart desires).

this allows scale system horizontally across nodes. workers can different machines executing these tasks. safe if db crashes (though may still have design redundancy machine running rabbitmq service).

db should used persistent storage , not queue processing.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -