Skip to content

Exploration of projections#94

Open
Gnuxie wants to merge 3 commits into
mainfrom
gnuxie/exploration
Open

Exploration of projections#94
Gnuxie wants to merge 3 commits into
mainfrom
gnuxie/exploration

Conversation

@Gnuxie

@Gnuxie Gnuxie commented Jan 9, 2026

Copy link
Copy Markdown
Member

No description provided.

Comment on lines +56 to +59
- We were unable to experiment with how two inputs to a _projection_ interact
around a fork and merge. The suspicion I have is that if there needs to be
synchronisation or progress updates then the revision is badly designed in
some way. But it does need investigating.

@Gnuxie Gnuxie Apr 7, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The way to fix this is to reduce and merge deltas before reducing a new projection node and update track via source progress ID's. You only need update tracking relative to source streams.

Comment on lines +61 to +71
- When experimenting with _projection nodes_ it became clear that in some
situations the reducer for producing the delta had similar code as the reducer
for producing the next _projection node_ when reducing that delta. We thought
about what it would look like to merge the two steps into one join. But it
became apparent that doing so would mean maintaining an independent code path
that is rarely used for reducing the delta into a projection node. Ie if you
wanted to restore a projection node from the deltas it produces then you would
have to use a rarely used code path. Which is very unideal. The only way you
could do this is by only reproducing projection nodes from input deltas, not
the output deltas. It needs thought about whether this is something we want to
do for PRR.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's probably an essential trade-off of the system. And honestly seems like a small price to pay for the benefits

Comment on lines +73 to +79
- Additionally we spared some thought for how to persist projection nodes and
run reducers without loading the entire projection. One idea was to shard the
projection node data and input delta and only run part of the reducer at a
time. But it's not clear to me how feasible it is to find common keys in input
to partition on especially when there are multiple input projections. It would
be highly desirable to do this over adding IO into reducer code which is meant
to be deterministic.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Deltas can be merged deterministically so the number of inputs shouldn't be relevant. I think the problem here though is that the projection node itself has to be partitioned (so the whole thing can be loaded into memory and run reducers). It's just a theory as to whether we can do that. And we also need to consider that if this is what we depend on, then we need to make sure that there aren't fundamental limitations to partitioning projection nodes or we can do that arbitrarily and infinity. So that's what a future experiment should test.

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.

1 participant