Skip to content

Commit db2fa79

Browse files
shayne-fletchermeta-codesync[bot]
authored andcommitted
RemoteActor -> Referable (#1435)
Summary: Pull Request resolved: #1435 closing the loop on the `RemoteActor` thread in D83850739: rename `RemoteActor` -> `Referable` via `find fbcode/monarch -type f -exec sed -i -e 's/\bRemoteActor\b/Referable/g' {} +`. Reviewed By: mariusae Differential Revision: D83933787 fbshipit-source-id: be966446bbe7944648d00282d1ef9172a5897a55
1 parent 42d4da6 commit db2fa79

File tree

24 files changed

+148
-148
lines changed

24 files changed

+148
-148
lines changed

docs/source/books/hyperactor-book/src/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
- [Handler](actors/handler.md)
3636
- [RemoteableActor](actors/remotable_actor.md)
3737
- [Checkpointable](actors/checkpointable.md)
38-
- [RemoteActor](actors/remote_actor.md)
38+
- [Referable](actors/remote_actor.md)
3939
- [Binds](actors/binds.md)
4040
- [RemoteHandles](actors/remote_handles.md)
4141
- [ActorHandle](actors/actor_handle.md)

docs/source/books/hyperactor-book/src/actors/actor_handle.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ pub fn bind<R: Binds<A>>(&self) -> ActorRef<R>
108108
```
109109
This method requires that `R` implements the `Binds<A>` trait. The `Binds` trait specifies how to associate a remote-facing reference type with the concrete ports handled by the actor:
110110
```rust
111-
pub trait Binds<A: Actor>: RemoteActor {
111+
pub trait Binds<A: Actor>: Referable {
112112
fn bind(ports: &Ports<A>);
113113
}
114114
```

docs/source/books/hyperactor-book/src/actors/binds.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The `Binds` trait defines how an actor's ports are associated with the message types it can receive remotely.
44
```rust
5-
pub trait Binds<A: Actor>: RemoteActor {
5+
pub trait Binds<A: Actor>: Referable {
66
fn bind(ports: &Ports<A>);
77
}
88
```

docs/source/books/hyperactor-book/src/actors/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This chapter introduces the actor system in hyperactor. We'll cover:
1010
- The [`Handler`](./handler.md) trait for defining message-handling behavior
1111
- The [`RemotableActor`](./remotable_actor.md) trait for enabling remote spawning
1212
- The [`Checkpointable`](./checkpointable.md) trait for supporting actor persistence and recovery
13-
- The [`RemoteActor`](./remote_actor.md) marker trait for remotely referencable types
13+
- The [`Referable`](./remote_actor.md) marker trait for remotely referencable types
1414
- The [`Binds`](./binds.md) trait for wiring exported ports to reference types
1515
- The [`RemoteHandles`](./remote_handles.md) trait for associating message types with a reference
1616
- The [`ActorHandle`](./actor_handle.md) type for referencing and communicating with running actors

docs/source/books/hyperactor-book/src/actors/remotable_actor.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ Returns a stable `TypeId` for the actor type. Used to identify actor types at ru
4848
## Blanket Implementation
4949

5050
The RemotableActor trait is automatically implemented for any actor type `A` that:
51-
- implements `Actor` and `RemoteActor`,
51+
- implements `Actor` and `Referable`,
5252
- and whose `Params` type implements `RemoteMessage`.
5353

5454
This allows `A` to be remotely registered and instantiated from serialized data, typically via the runtime's registration mechanism.
5555

5656
```rust
5757
impl<A> RemotableActor for A
5858
where
59-
A: Actor + RemoteActor,
59+
A: Actor + Referable,
6060
A: Binds<A>,
6161
A::Params: RemoteMessage,
6262
{

docs/source/books/hyperactor-book/src/actors/remote_actor.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# RemoteActor
1+
# Referable
22

33
```rust
4-
pub trait RemoteActor: Named + Send + Sync {}
4+
pub trait Referable: Named + Send + Sync {}
55
```
66
This is a marker trait indicating that a type is eligible to serve as a reference to a remote actor (i.e., an actor that may reside on a different proc).
77

docs/source/books/hyperactor-book/src/actors/remote_handles.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# RemoteHandles
22

3-
The `RemoteHandles<M>` trait is a marker used to declare that a given `RemoteActor` type can handle messages of type `M`.
3+
The `RemoteHandles<M>` trait is a marker used to declare that a given `Referable` type can handle messages of type `M`.
44
```rust
5-
pub trait RemoteHandles<M: RemoteMessage>: RemoteActor {}
5+
pub trait RemoteHandles<M: RemoteMessage>: Referable {}
66
```
77

88
An implementation like:

docs/source/books/hyperactor-book/src/macros/alias.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Expanding the example above yields a zero-sized façade actor with trait impls:
8585
```rust
8686
pub struct ShoppingApi;
8787

88-
impl hyperactor::actor::RemoteActor for ShoppingApi {}
88+
impl hyperactor::actor::Referable for ShoppingApi {}
8989

9090
impl<A> hyperactor::actor::Binds<A> for ShoppingApi
9191
where

docs/source/books/hyperactor-book/src/macros/export.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The macro expands to include:
1717
- A `Named` implementation for the actor
1818
- A `Binds<Self>` implementation that registers supported message types
1919
- Implementations of `RemoteHandles<T>` for each type in the `handlers = [...]` list
20-
- A `RemoteActor` marker implementation
20+
- A `Referable` marker implementation
2121
- If `spawn = true`, a `RemotableActor` implementation and an inventory registration of the `spawn` function.
2222

2323
This enables the actor to be:
@@ -27,7 +27,7 @@ This enables the actor to be:
2727

2828
## Generated Implementations (simplified)
2929
```rust
30-
impl RemoteActor for ShoppingListActor {}
30+
impl Referable for ShoppingListActor {}
3131

3232
impl RemoteHandles<ShoppingList> for ShoppingListActor {}
3333
impl RemoteHandles<Signal> for ShoppingListActor {}

docs/source/books/hyperactor-book/src/references/typed_refs.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Typed references are strongly typed wrappers over raw identifiers like `ActorId`
66

77
There are three main typed reference types:
88

9-
- [`ActorRef<A>`](#actorrefa): A typed reference to an actor implementing the `RemoteActor` trait.
9+
- [`ActorRef<A>`](#actorrefa): A typed reference to an actor implementing the `Referable` trait.
1010
- [`PortRef<M>`](#portrefm): A reference to a reusable mailbox port for messages of type `M` implementing the `RemoteMessage` trait.
1111
- [`OncePortRef<M>`](#onceportrefm): A reference to a one-shot port for receiving a single response of type `M` implementing the `RemoteMessage` trait.
1212

@@ -16,7 +16,7 @@ These types are used as parameters in messages, return values from bindings, and
1616

1717
## `ActorRef<A>`
1818

19-
`ActorRef<A>` is a typed reference to an actor of type `A`. It provides a way to identify and address remote actors that implement `RemoteActor`.
19+
`ActorRef<A>` is a typed reference to an actor of type `A`. It provides a way to identify and address remote actors that implement `Referable`.
2020

2121
```rust
2222
let actor_ref: ActorRef<MyActor> = ActorRef::attest(actor_id);
@@ -29,7 +29,7 @@ Unlike `ActorHandle<A>`, an `ActorRef` is just a reference — it doesn’t guar
2929
### Definition
3030
```rust
3131
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
32-
pub struct ActorRef<A: RemoteActor> {
32+
pub struct ActorRef<A: Referable> {
3333
actor_id: ActorId,
3434
phantom: PhantomData<A>,
3535
}
@@ -80,7 +80,7 @@ Just like `PortRef`, this wraps a `PortId` with a phantom message type `M` for t
8080

8181
## `GangRef<A>`
8282

83-
A `GangRef<A>` is a typed reference to a gang of actors, all of which implement the same `RemoteActor` type `A`.
83+
A `GangRef<A>` is a typed reference to a gang of actors, all of which implement the same `Referable` type `A`.
8484
```rust
8585
let gang_ref: GangRef<MyActor> = GangId::new(...).into();
8686
```
@@ -93,7 +93,7 @@ This allows you to route messages to specific members of a replicated actor grou
9393
### Definition
9494
```rust
9595
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Hash, Ord)]
96-
pub struct GangRef<A: RemoteActor> {
96+
pub struct GangRef<A: Referable> {
9797
gang_id: GangId,
9898
phantom: PhantomData<A>,
9999
}

0 commit comments

Comments
 (0)