Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adklempner
Copy link
Member

No description provided.

Copy link
Contributor

@jm-clius jm-clius left a 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.
Copy link
Contributor

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:

Suggested change
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.

Comment on lines +216 to +217
(high-availability cache) or other peers
using the `retrieval_hint` in the `HistoryEntry`.
Copy link
Contributor

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.

Suggested change
(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.

Comment on lines 79 to 80
string message_id = 2; // Unique identifier of the message
string channel_id = 3; // Identifier of the channel to which the message belongs
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants