hydroflow icon indicating copy to clipboard operation
hydroflow copied to clipboard

make edge references cause scheduling

Open MingweiSamuel opened this issue 1 year ago • 3 comments

as pointed out by @shadaj

When state changes it should trigger (the state/sources that feed into) the operators that reference that state

MingweiSamuel avatar Apr 26 '24 12:04 MingweiSamuel

Plan is to achieve this by rewriting references to be prepared via an n-way cross-join bimorphism, and fed downstream as a tuple. That means the consumer needs to be rewritten to handle that tuple rather than its original input.

x = source_stream(...) -> fold(||...);
// good = source_stream(...) 
//   -> map(|(i, j)| i*j + x);
x -> [1]cross;
good = source_stream(...) -> [0]cross;
cross = cross_join() 
    -> map(|((i, j), x)| i*j + x);

jhellerstein avatar May 10 '24 22:05 jhellerstein

Hmm I'm a bit worried about actually implementing this as a cross join. While this is the correct mental model I wonder if it might get in the way of Rust's closure capturing logic since often the closure will be fine with just a borrow of the singleton rather than a copy.

shadaj avatar May 10 '24 23:05 shadaj

That's a good point

MingweiSamuel avatar May 13 '24 16:05 MingweiSamuel