I understand that this is not possible in DynamoDB.
DynamoDB Streams seem to be an option, but...
My struggle involves being able to create aggregates over a specific period of time. I want to be able to get the top XX in the past 24 hours at any point in time.
Assume I have categories such as Topics (e.g., IoT, AI, AML, etc.). I want to count the top trending topics over a period of time, such as the top 10 trending topics in the past 24 hours or 72 hours. Based on number of posts in these topics.
How can I achieve something like this with DynamoDB?
I use Topic as my PK, and Timestamp#UserId as SK. So each time a user make a post on a topic, a new document is created.. I save some attributes in the document, but that's not relevant here.
Assume:
- There are thousands of inserts every second (i.e thousands of posts on different topics)
- Getting the trending topics isn't a real-time requierment. It can be something that gets calculated every 1h or so and posted somewhere else.
Any pointers is appreciated on best approach, and if another stack would make more sense.
Cheers