Skip to content

int_proxy: a proxy half-join tactic over a backend - #1019

Closed
frankmcsherry wants to merge 1 commit into
TimelyDataflow:master-nextfrom
frankmcsherry:phj-1-dd-half-join-tactic
Closed

frankmcsherry wants to merge 1 commit into
TimelyDataflow:master-nextfrom
frankmcsherry:phj-1-dd-half-join-tactic

Conversation

@frankmcsherry

Copy link
Copy Markdown
Member

The half join had no seam between its time logic and its data: dogs3's HalfJoinTactic reads the arrangement's batches itself, so nothing can wrap it, for example to read an arrangement as of a frontier. This adds ProxyHalfJoinTactic over a ProxyHalfJoinBackend, in the shape of the proxy join and reduce.

The tactic owns the comparison of times, strictness, cutting work into blocks of keys, the diff product, and the rule for output times: the update's own time, carrying its data time joined with the arranged time.

The backend owns staging the released updates, presenting each block of both sides by key, comparing real keys where the key proxy is a hash, and building output containers.

Notes:

  • The comparison is Ord, which Timestamp promises is a linear extension of the partial order. Nothing needs TotalOrder, so product times work.
  • Arranged times are presented as stored. Advancing them by a frontier can move them in the total order relative to stream times they are incomparable with. For example, with lower = {(1, 0)}, (0, 5) sorts before (1, 0), but advances to (1, 5), which sorts after it. So the backend is given no lower bound to advance by.
  • The arranged side has the join's contract, sorted and consolidated by ((key, val), time). The stream side is in key order only.
  • Matches are pairs of positions into the block's two presented sides, which cross is handed back, so a backend can evaluate the time rule in its own layout. Materializing two times per match in the tactic cost about a third of a half-join-heavy tick on DDIR times.

VecHalfJoinBackend is the reference backend. The new test checks the tactic against the definition over Product<u64, u64> times, strict and not, at several block sizes, and with colliding hashes. tests/int_proxy.rs: 19 passed.

The dogs3 HalfJoinTactic impl and the DDIR port follow in separate PRs that build on this one.

🤖 Generated with Claude Code

https://claude.ai/code/session_019XsakwFGwtESwZ1gSYwG4o

The half join had no seam between its time logic and its data: dogs3's
HalfJoinTactic reads the arrangement's batches itself. ProxyHalfJoinTactic
owns the total-order comparison, strictness, the output time rule (the
update's own time, and its data time joined with the arranged time) and
blocking; ProxyHalfJoinBackend owns key matching, value proxies and output
containers, like the join and reduce backends. Matches are pairs of
positions into the block's two presented sides, which `cross` is handed
back, so a backend evaluates the time rule in its own layout; a time per
match in the tactic measured at a third of a half-join-heavy tick.

Arranged times are presented as stored: advancing them by a frontier
moves them in the total order relative to incomparable stream times, so
the backend is given no lower bound to advance by. The arranged side is a
bridge with the join's contract, sorted and consolidated by
((key, val), time); the stream side is in key order only.

VecHalfJoinBackend is the reference backend. The test checks the tactic
against the definition over product times, strict and not, several block
sizes, and colliding hashes.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_019XsakwFGwtESwZ1gSYwG4o
@frankmcsherry

Copy link
Copy Markdown
Member Author

Replaced by #1022, which moves the proxy half-join tactic into dogs3, built on int_proxy's public surface.

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