-
Notifications
You must be signed in to change notification settings - Fork 3
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
docs: add optional retrieval hint to causal history in sds #130
base: main
Are you sure you want to change the base?
Conversation
6ff5599
to
5be7265
Compare
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.
Thanks! This looks great. :)
Added some minor non-blocking comments. Perhaps for a follow-up PR, I would appreciate your and @shash256 feedback on question below re general Message
field types.
@@ -137,6 +142,8 @@ include this in the `lamport_timestamp` field. | |||
and include these in an ordered list in the `causal_history` field. | |||
The number of message IDs to include in the `causal_history` depends on the application. | |||
We recommend a causal history of two message IDs. | |||
* the participant MAY include a `retrieval_hint` in the `HistoryEntry` | |||
for each message ID in the `causal_history` field. |
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.
Perhaps just need more context where this field is first introduced:
for each message ID in the `causal_history` field. | |
for each message ID in the `causal_history` field. | |
This is an application-specific field to facilitate retrieval of messages, | |
e.g. from high-availability caches. |
(high-availability cache) or other peers | ||
using the `retrieval_hint` in the `HistoryEntry`. |
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.
Subtle difference, but it's important that retrieval can happen without using the retrieval_hint
.
(high-availability cache) or other peers | |
using the `retrieval_hint` in the `HistoryEntry`. | |
(high-availability cache) or other peers. | |
It MAY use the application-specific `retrieval_hint` in the `HistoryEntry` to facilitate retrieval. |
string message_id = 2; // Unique identifier of the message | ||
string channel_id = 3; // Identifier of the channel to which the message belongs |
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.
While we're here, should we review the field types for the rest of the Message
? The choice of string
for message_id
and channel_id
was heavily influenced by similar protocols and current Status code, but might not be the most practical from implementation perspective: I can imagine bytes
perhaps being more reasonable for message_id
and int32
for channel_id
.
Any opinions here? cc @shash256
No description provided.