java - How to achieve a bounded model in DynamoDB? -


I have issues with the following:

I have a list of sorted user events in DynamoDB I want to keep in the descending order, as if I look at the latest events at the top, however, I only take an interest in the latest 1000 events.

At the moment I have a table with the user id as the hash key, and the timestamp of the user event as the range.

Is any effective measure with a maximum of 1000 to keep the number of items in the range for any user, first with the latest events?

I am using Java lower-level API, if it matters.

I think your table schema is perfect, you can ask the table with the user id More options can be used

  ScanIndexForward = & gt; False   

This will sort your data in descending order on the boundary key (which is the timestamp)

and you can use the option

  range => 1000   

This will display only 1000 programs.

Hopefully

Comments

Popular posts from this blog

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -