docs(design): evaluate Actor pattern for Generator/Sender/Receiver (#2136)#4210
Merged
oferchen merged 1 commit intoMay 17, 2026
Merged
Conversation
…2136) Reframe the actor-pattern evaluation around supervised tokio tasks (Erlang/Akka style with bounded mailboxes and a supervisor that restarts crashed actors) to match the post-async-migration target the migration plan commits us to. The recommendation stays: reject the actor reshape for the production hot path because rsync's wire protocol is sequential with no resume primitive, so supervisor restart is a no-op; adopt the actor surface only for multi-host fan-out and fault-injection tests, behind --features async-pipeline. Cross-references #4186 (async migration plan), #4196 (spawn_blocking bridge), #2134 (type-state for protocol phases, recently merged), and #1935 (async daemon listener).
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…2136) (#4210) Reframe the actor-pattern evaluation around supervised tokio tasks (Erlang/Akka style with bounded mailboxes and a supervisor that restarts crashed actors) to match the post-async-migration target the migration plan commits us to. The recommendation stays: reject the actor reshape for the production hot path because rsync's wire protocol is sequential with no resume primitive, so supervisor restart is a no-op; adopt the actor surface only for multi-host fan-out and fault-injection tests, behind --features async-pipeline. Cross-references #4186 (async migration plan), #4196 (spawn_blocking bridge), #2134 (type-state for protocol phases, recently merged), and #1935 (async daemon listener).
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…2136) (#4210) Reframe the actor-pattern evaluation around supervised tokio tasks (Erlang/Akka style with bounded mailboxes and a supervisor that restarts crashed actors) to match the post-async-migration target the migration plan commits us to. The recommendation stays: reject the actor reshape for the production hot path because rsync's wire protocol is sequential with no resume primitive, so supervisor restart is a no-op; adopt the actor surface only for multi-host fan-out and fault-injection tests, behind --features async-pipeline. Cross-references #4186 (async migration plan), #4196 (spawn_blocking bridge), #2134 (type-state for protocol phases, recently merged), and #1935 (async daemon listener).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/design/actor-pattern-generator-sender-receiver.mdaround the post-async-migration target: supervised tokio tasks with bounded mailboxes and a supervisor that restarts crashed actors (Erlang / Akka style).--features async-pipeline.The load-bearing objection is that rsync's wire protocol is sequential and has no resume primitive: restarting a Generator mid-transfer cannot reconstruct the file-list cursor, NDX window, phase toggle, multiplex frame state, or partial varint, so the supervisor's defining feature is a no-op. The other axes (mailbox backpressure, observability, fault injection, multi-host fan-out) are real wins but are addressable behind a feature flag without reshaping the production transfer loop.
Cross-references #4186 async migration plan, #4196 spawn_blocking bridge, #2134 type-state for protocol phases (recently merged), #1935 async daemon listener impl. Aligns with the bounded type-state recommendation #2134 settled on, and slots into phase 4.5 / phase 5 of the migration plan.
Closes #2136.
Test plan
docs/design/async-migration-plan.md,docs/design/spawn-blocking-bridge.md,docs/design/async-channel-abstraction.md,docs/design/type-state-protocol-phases.md,docs/architecture/parallelization.md,docs/audits/async-ssh-transport.md,docs/audits/tokio-dependency-boundary-2026.md,docs/plans/2026-03-28-parallel-chunks-design.md.crates/transfer/src/generator/transfer.rs:731,crates/transfer/src/receiver/transfer.rs:55,519,680,crates/transfer/src/disk_commit/thread.rs:47,172,crates/transfer/src/pipeline/spsc.rs,crates/engine/src/concurrent_delta/work_queue/bounded.rs:88-104.