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

feat(hydroflow_plus)!: introduce an unordered variant of streams to strengthen determinism guarantees #1568

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

shadaj
Copy link
Member

@shadaj shadaj commented Nov 17, 2024

Previously, sending data from a Cluster would return a stream assumed to have deterministic contents and ordering, which is false. This introduces another type parameter for Stream which tracks whether element ordering is expected to be deterministic, and restricts operators such as fold and reduce to commutative aggregations accordingly.

Stack created with Sapling. Best reviewed with ReviewStack.

Copy link

cloudflare-workers-and-pages bot commented Nov 17, 2024

Deploying hydroflow with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1044f81
Status: ✅  Deploy successful!
Preview URL: https://693726cb.hydroflow.pages.dev
Branch Preview URL: https://pr1568.hydroflow.pages.dev

View logs

hydroflow_plus_test/src/cluster/paxos.rs Outdated Show resolved Hide resolved
hydroflow_plus_test/src/cluster/paxos.rs Show resolved Hide resolved
hydroflow_plus_test/src/cluster/paxos_bench.rs Outdated Show resolved Hide resolved
Copy link
Member

@MingweiSamuel MingweiSamuel left a comment

Choose a reason for hiding this comment

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

Nice

hydroflow_plus/src/location/can_send.rs Show resolved Hide resolved
hydroflow_plus/src/stream.rs Outdated Show resolved Hide resolved
hydroflow_plus/src/stream.rs Show resolved Hide resolved
…trengthen determinism guarantees

Previously, sending data from a `Cluster` would return a stream assumed to have deterministic contents **and** ordering, which is false. This introduces another type parameter for `Stream` which tracks whether element ordering is expected to be deterministic, and restricts operators such as `fold` and `reduce` to commutative aggregations accordingly.
@MingweiSamuel
Copy link
Member

MingweiSamuel commented Nov 21, 2024

(Didn't look at the paxos code deeply)

@shadaj shadaj merged commit 4c5ca31 into main Nov 21, 2024
29 checks passed
@shadaj shadaj deleted the pr1568 branch November 21, 2024 17:13
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