-
-
Notifications
You must be signed in to change notification settings - Fork 135
[Platform] Add ID to message bag #1027
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Please add some tests |
|
@Guikingone we should leverage this new id in the chat component then |
|
@OskarStark Hum, yes and "maybe no" 😅 If we're setting the id at the bag level, how do we pass it to the store / chat one? We're ending in the same discussions that we've faced in #254, if the bag is the object storing the current conversation identifier, we should/must have an identifier at the Not to mention that at If @lochmueller has a POV on this issue, I'll be more than happy to discuss around it as this is something that we're facing in #821 (the I dont want to "lock this PR in endless debates" but I already faced this situation and I'm still equally open to add an identifier at bag level (because this could lead to a solution) and opposed to add it as I don't see the benefits against the disadvantages 😅 |
chr-hertel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, we're coming back to a previous discussion - but that's fair.
Let's bring in that ID
|
We might need to update the normalization process, maybe creating a new Could be handled in another PR but might be worth the work to ensure that we don't miss the id during normalization. |
|
@Guikingone regarding the chat component you mean? |
|
@chr-hertel Yes, after thinking about it, the id in the message bag could lead to a solution. Let's agree on the fact that messages are identified using an UUID, now, we're adding an UUID to the message bag, this could create a OTM-like relation between bag and messages, so now, we have the "id" of a chat, we could store it in message stores as a "foreign-key like" identifier used by each messages and retrieve each messages linked to this bag, this storage part will require a new normalizer to handle the "bag -> messages" relation, that's why I was thinking about a The only issue that we're facing now is "how to keep this id at This lead to a stateful service but stores are already stateful, messages store are also stateful (as they store the identifier of the queue / table / etc) but it will allows to "switch / fork / othermethodname" between bags (maybe we can list bags in a command like |
Add ID to the message bag.