Leveraging DynamoDB sort key for historic messages #23710
juliangrueber
announced in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Checked
Feature request
Have a single record for each interaction with the following key schema: Have the
session_id
as the primary key (hash key) and use a timestamp or another identifier as the sort key (range key).In particular, for a single table design:
To get the entire history one would querying the table based on the given PK, for instance, with the condition:
In the case of having a multi table design, the principle is the same. One would just use the SESSION_ID and TIMESTAMP instead of PK and SK, respectively.
Motivation
As of now, each session has exactly a single record in the DynamoDB table. That limits the size of the message history by 400 KB.
After each interaction the session is fully overwritten using the
put_item
operation which does not allow a full lineage.If the history becomes large, retrieving might become inefficient
Proposal (If applicable)
No response
Beta Was this translation helpful? Give feedback.
All reactions