Skip to content

Conversation

@scarmuega
Copy link
Member

This PR introduces a stateful cursor in a similar fashion to the one in Oura.

This works by using the same storage plugin configured for the actual data output. The value of the cursor is scoped for a specific pipeline (aka: Scrolls process). When the pipeline starts, it queries the storage plugin to get the value of the cursor. If we find a value, it will override any "intersect" configuration and use the cursor instead.

The cursor is updated each time a block is done with all reducer algorithms. This introduces a new requirement: reducers need to be synchronized at the block level. Meaning, we can't have reducers sending update commands from one block while a different reducer is still processing the previous block. To enforce we'll need to merge each reducer algorithm into a single stage and parallelize the process within the scope of a block.

@scarmuega scarmuega marked this pull request as ready for review May 28, 2022 01:38
@scarmuega scarmuega requested a review from rvcas May 28, 2022 01:38
CRDTCommand::block_starting(block),
))?;

for reducer in self.reducers.iter_mut() {
Copy link
Member

Choose a reason for hiding this comment

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

Is this where we plan to use rayon or something to do these in parallel?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, exactly

@scarmuega scarmuega requested a review from matiwinnetou May 28, 2022 14:40
@scarmuega scarmuega merged commit 01fe154 into main May 28, 2022
@scarmuega scarmuega deleted the feat/cursor branch May 28, 2022 20:47
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.

3 participants