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

Feature/col 3 rewind interval #55

Closed
wants to merge 18 commits into from

Conversation

mschristensen
Copy link
Collaborator

No description provided.

@mschristensen mschristensen requested a review from zknill October 17, 2023 14:38
@mschristensen mschristensen force-pushed the feature/COL-3-rewind-interval branch 2 times, most recently from f7b8a56 to 73c671e Compare October 17, 2023 15:40
Copy link
Collaborator

@zknill zknill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking really good, a few small thoughts/comments here and there

src/stream/Middleware.ts Outdated Show resolved Hide resolved
src/stream/Middleware.ts Outdated Show resolved Hide resolved
src/stream/Middleware.ts Outdated Show resolved Hide resolved
src/Model.ts Outdated Show resolved Hide resolved
src/Model.ts Outdated Show resolved Hide resolved
Adds a SequenceResumer middleware that discards messages up until the attach point given by the sequence ID is reached. Can be used in conjunction with a sliding window re-orderer via the OrderedSequenceResumer middleware.
The SyncFunc now returns the sequenceID and stateTimestamp along with
the model state snapshot. This is used by the model to rewind to the
correct point in the stream.
In order to work around rewind's 100 message limit, we can use a history query with untilAttach to paginate back through messages until the target sequenceID boundary is reached. This has the additional benefit that enabling persisted history on the channel just works, allowing you to extend your state cache TTL.
@mschristensen mschristensen force-pushed the feature/COL-3-rewind-interval branch from 7ae2eb9 to 3481701 Compare October 19, 2023 16:30
@mschristensen mschristensen deleted the feature/COL-3-rewind-interval branch October 19, 2023 16:32
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