-
Notifications
You must be signed in to change notification settings - Fork 10
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
chore: add topic sequence_page #298
Conversation
proto/cachepubsub.proto
Outdated
// `resume_at_topic_sequence_number`. | ||
// Include this in your Subscribe() calls when you are reconnecting. The right value | ||
// is the last sequence_stamp you received. | ||
uint64 sequence_stamp = 4; |
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.
nit: topic_sequence_stamp
so that the field naming is similar to topic_sequence_number
.
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.
I don't really like the idea of mixing the names too closely. Stamp versus number being the only discriminator between the two seems confusing, particularly to someone with English as a second, third, or fourth language. It's already subtle enough haha
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 I did have that same thought. If anything I would rather change sequence
to something else instead of adding topic
to it.
proto/cachepubsub.proto
Outdated
// If you didn't have one, then this is just telling you what the sequence stamp is expected to be. | ||
// If you had one before, and this one is the same, then it's just telling you that you missed some messages | ||
// in the topic. Probably your client is consuming messages a little too slowly in this case! | ||
uint64 new_sequence_stamp = 3; |
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.
nit: new_topic_sequence_stamp
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.
Few clarifying questions on first read, thinking about client user experience
@malandis FYI I switched the name here after some discussion. Let me know what you think! |
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.
LGTM. page
doesn't quite feel 100% right to me but I don't have a better word to describe a time slice for a topic
// * to provide a best-effort awareness of stream contiguity, or lack thereof, | ||
// in case you need to know. | ||
// You can safely ignore them if none of that matters to you! | ||
// Topic sequence numbers give an order of messages per-topic. |
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.
Nit: They give an order per-topic-sequence-page.
I don't feel strongly about this either but just curious why switch from |
I am the opposite - |
Here's my reasoning for how I got here: It is impossible to please everyone with this name. Stamps are abstract and have no sense of meaning or order, nor even a notion of change. Page evokes a sense of order and continuity, with a clear signal that "pages turn." |
Add a sequence_page field to topics. This will be in the discontinuities, the subscribe message, and the items next to the sequence number.