-
Notifications
You must be signed in to change notification settings - Fork 74
Add re-ordering buffer to the actor side #1244
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
Closed
Closed
+383
−4
Conversation
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
80b2dc4
to
6a8efbc
Compare
pzhan9
added a commit
to pzhan9/monarch-1
that referenced
this pull request
Sep 17, 2025
Summary: In Rust V1, we want to move the re-ordering buffer from [comm actor](https://www.internalfb.com/code/fbsource/[aea72188b23ef1539c1a04996566a8f188e42644]/fbcode/monarch/hyperactor_mesh/src/comm.rs?lines=383-384) to the actor side. The basic idea is: * client assigns the seq no for messages it sends to actors; * the `(client_name, seq_no)` tuple is added to the message's header. * for direct send, client will add that header; * for multicast, a actor->seq map is passed to comm actors, and comm actor will add that header before delivering the message to actors. * Each actor instance maintains its own re-ordering buffer, and use the `seq_no` to buffer and re-order the message, before passing the message to the actor loop. This diff implements the last part, the re-ordering buffer in actor instance. Specifically, this diff wrap the re-ordering buffer under the `OrderChannel` abstraction, so it can fit to the current implementation seamlessly. The change is currently disabled behind the `ENABLE_CLIENT_SEQ_ASSIGNMENT` gate. Differential Revision: D82573932
pzhan9
added a commit
to pzhan9/monarch-1
that referenced
this pull request
Sep 20, 2025
Summary: In Rust V1, we want to move the re-ordering buffer from [comm actor](https://www.internalfb.com/code/fbsource/[aea72188b23ef1539c1a04996566a8f188e42644]/fbcode/monarch/hyperactor_mesh/src/comm.rs?lines=383-384) to the actor side. The basic idea is: * client assigns the seq no for messages it sends to actors; * the `(client_name, seq_no)` tuple is added to the message's header. * for direct send, client will add that header; * for multicast, a actor->seq map is passed to comm actors, and comm actor will add that header before delivering the message to actors. * Each actor instance maintains its own re-ordering buffer, and use the `seq_no` to buffer and re-order the message, before passing the message to the actor loop. This diff implements the last part, the re-ordering buffer in actor instance. Specifically, this diff wrap the re-ordering buffer under the `OrderChannel` abstraction, so it can fit to the current implementation seamlessly. The change is currently disabled behind the `ENABLE_CLIENT_SEQ_ASSIGNMENT` gate. Reviewed By: mariusae, shayne-fletcher Differential Revision: D82573932
pzhan9
added a commit
to pzhan9/monarch-1
that referenced
this pull request
Sep 22, 2025
Summary: In Rust V1, we want to move the re-ordering buffer from [comm actor](https://www.internalfb.com/code/fbsource/[aea72188b23ef1539c1a04996566a8f188e42644]/fbcode/monarch/hyperactor_mesh/src/comm.rs?lines=383-384) to the actor side. The basic idea is: * client assigns the seq no for messages it sends to actors; * the `(client_name, seq_no)` tuple is added to the message's header. * for direct send, client will add that header; * for multicast, a actor->seq map is passed to comm actors, and comm actor will add that header before delivering the message to actors. * Each actor instance maintains its own re-ordering buffer, and use the `seq_no` to buffer and re-order the message, before passing the message to the actor loop. This diff implements the last part, the re-ordering buffer in actor instance. Specifically, this diff wrap the re-ordering buffer under the `OrderChannel` abstraction, so it can fit to the current implementation seamlessly. The change is currently disabled behind the `ENABLE_CLIENT_SEQ_ASSIGNMENT` gate. Reviewed By: mariusae, shayne-fletcher Differential Revision: D82573932
pzhan9
added a commit
to pzhan9/monarch-1
that referenced
this pull request
Sep 22, 2025
Summary: In Rust V1, we want to move the re-ordering buffer from [comm actor](https://www.internalfb.com/code/fbsource/[aea72188b23ef1539c1a04996566a8f188e42644]/fbcode/monarch/hyperactor_mesh/src/comm.rs?lines=383-384) to the actor side. The basic idea is: * client assigns the seq no for messages it sends to actors; * the `(client_name, seq_no)` tuple is added to the message's header. * for direct send, client will add that header; * for multicast, a actor->seq map is passed to comm actors, and comm actor will add that header before delivering the message to actors. * Each actor instance maintains its own re-ordering buffer, and use the `seq_no` to buffer and re-order the message, before passing the message to the actor loop. This diff implements the last part, the re-ordering buffer in actor instance. Specifically, this diff wrap the re-ordering buffer under the `OrderChannel` abstraction, so it can fit to the current implementation seamlessly. The change is currently disabled behind the `ENABLE_CLIENT_SEQ_ASSIGNMENT` gate. Reviewed By: mariusae, shayne-fletcher Differential Revision: D82573932
pzhan9
added a commit
to pzhan9/monarch-1
that referenced
this pull request
Sep 22, 2025
Summary: In Rust V1, we want to move the re-ordering buffer from [comm actor](https://www.internalfb.com/code/fbsource/[aea72188b23ef1539c1a04996566a8f188e42644]/fbcode/monarch/hyperactor_mesh/src/comm.rs?lines=383-384) to the actor side. The basic idea is: * client assigns the seq no for messages it sends to actors; * the `(client_name, seq_no)` tuple is added to the message's header. * for direct send, client will add that header; * for multicast, a actor->seq map is passed to comm actors, and comm actor will add that header before delivering the message to actors. * Each actor instance maintains its own re-ordering buffer, and use the `seq_no` to buffer and re-order the message, before passing the message to the actor loop. This diff implements the last part, the re-ordering buffer in actor instance. Specifically, this diff wrap the re-ordering buffer under the `OrderChannel` abstraction, so it can fit to the current implementation seamlessly. The change is currently disabled behind the `ENABLE_CLIENT_SEQ_ASSIGNMENT` gate. Reviewed By: mariusae, shayne-fletcher Differential Revision: D82573932
pzhan9
added a commit
to pzhan9/monarch-1
that referenced
this pull request
Sep 22, 2025
Summary: In Rust V1, we want to move the re-ordering buffer from [comm actor](https://www.internalfb.com/code/fbsource/[aea72188b23ef1539c1a04996566a8f188e42644]/fbcode/monarch/hyperactor_mesh/src/comm.rs?lines=383-384) to the actor side. The basic idea is: * client assigns the seq no for messages it sends to actors; * the `(client_name, seq_no)` tuple is added to the message's header. * for direct send, client will add that header; * for multicast, a actor->seq map is passed to comm actors, and comm actor will add that header before delivering the message to actors. * Each actor instance maintains its own re-ordering buffer, and use the `seq_no` to buffer and re-order the message, before passing the message to the actor loop. This diff implements the last part, the re-ordering buffer in actor instance. Specifically, this diff wrap the re-ordering buffer under the `OrderChannel` abstraction, so it can fit to the current implementation seamlessly. The change is currently disabled behind the `ENABLE_CLIENT_SEQ_ASSIGNMENT` gate. Reviewed By: mariusae, shayne-fletcher Differential Revision: D82573932
6a8efbc
to
a465169
Compare
pzhan9
added a commit
to pzhan9/monarch-1
that referenced
this pull request
Sep 22, 2025
Summary: In Rust V1, we want to move the re-ordering buffer from [comm actor](https://www.internalfb.com/code/fbsource/[aea72188b23ef1539c1a04996566a8f188e42644]/fbcode/monarch/hyperactor_mesh/src/comm.rs?lines=383-384) to the actor side. The basic idea is: * client assigns the seq no for messages it sends to actors; * the `(client_name, seq_no)` tuple is added to the message's header. * for direct send, client will add that header; * for multicast, a actor->seq map is passed to comm actors, and comm actor will add that header before delivering the message to actors. * Each actor instance maintains its own re-ordering buffer, and use the `seq_no` to buffer and re-order the message, before passing the message to the actor loop. This diff implements the last part, the re-ordering buffer in actor instance. Specifically, this diff wrap the re-ordering buffer under the `OrderChannel` abstraction, so it can fit to the current implementation seamlessly. The change is currently disabled behind the `ENABLE_CLIENT_SEQ_ASSIGNMENT` gate. Reviewed By: mariusae, shayne-fletcher Differential Revision: D82573932
pzhan9
added a commit
to pzhan9/monarch-1
that referenced
this pull request
Sep 22, 2025
Summary: In Rust V1, we want to move the re-ordering buffer from [comm actor](https://www.internalfb.com/code/fbsource/[aea72188b23ef1539c1a04996566a8f188e42644]/fbcode/monarch/hyperactor_mesh/src/comm.rs?lines=383-384) to the actor side. The basic idea is: * client assigns the seq no for messages it sends to actors; * the `(client_name, seq_no)` tuple is added to the message's header. * for direct send, client will add that header; * for multicast, a actor->seq map is passed to comm actors, and comm actor will add that header before delivering the message to actors. * Each actor instance maintains its own re-ordering buffer, and use the `seq_no` to buffer and re-order the message, before passing the message to the actor loop. This diff implements the last part, the re-ordering buffer in actor instance. Specifically, this diff wrap the re-ordering buffer under the `OrderChannel` abstraction, so it can fit to the current implementation seamlessly. The change is currently disabled behind the `ENABLE_CLIENT_SEQ_ASSIGNMENT` gate. Reviewed By: mariusae, shayne-fletcher Differential Revision: D82573932
a465169
to
18d7b30
Compare
Summary: In Rust V1, we want to move the re-ordering buffer from [comm actor](https://www.internalfb.com/code/fbsource/[aea72188b23ef1539c1a04996566a8f188e42644]/fbcode/monarch/hyperactor_mesh/src/comm.rs?lines=383-384) to the actor side. The basic idea is: * client assigns the seq no for messages it sends to actors; * the `(client_name, seq_no)` tuple is added to the message's header. * for direct send, client will add that header; * for multicast, a actor->seq map is passed to comm actors, and comm actor will add that header before delivering the message to actors. * Each actor instance maintains its own re-ordering buffer, and use the `seq_no` to buffer and re-order the message, before passing the message to the actor loop. This diff implements the last part, the re-ordering buffer in actor instance. Specifically, this diff wrap the re-ordering buffer under the `OrderChannel` abstraction, so it can fit to the current implementation seamlessly. The change is currently disabled behind the `ENABLE_CLIENT_SEQ_ASSIGNMENT` gate. Reviewed By: mariusae, shayne-fletcher Differential Revision: D82573932
18d7b30
to
284ffc5
Compare
This pull request has been merged in 2a1e99a. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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:
In Rust V1, we want to move the re-ordering buffer from comm actor to the actor side. The basic idea is:
(client_name, seq_no)
tuple is added to the message's header.seq_no
to buffer and re-order the message, before passing the message to the actor loop.This diff implements the last part, the re-ordering buffer in actor instance. Specifically, this diff wrap the re-ordering buffer under the
OrderChannel
abstraction, so it can fit to the current implementation seamlessly.The change is currently disabled behind the
ENABLE_CLIENT_SEQ_ASSIGNMENT
gate.Differential Revision: D82573932