Skip to content

Commit e18632a

Browse files
authored
Fix Command/Request term usage in irpc blog post (#362)
1 parent 1f1545b commit e18632a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/app/blog/irpc/page.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ enum Request {
5151
}
5252
```
5353

54-
Your "client" then is a tokio `mpsc::Sender<Command>` or a small wrapper around it that makes it more convenient to use. And your server is a task that contains a handler loop.
54+
Your "client" then is a tokio `mpsc::Sender<Request>` or a small wrapper around it that makes it more convenient to use. And your server is a task that contains a handler loop.
5555

5656
Calling such a service without a client wrapper is quite cumbersome. For example, here's what it takes to call `Get`:
5757

5858
```rust
5959
let (tx, rx) = oneshot::channel();
60-
client.send(Command::Get { key: "a".to_string(), response: tx }).await?;
60+
client.send(Request::Get { key: "a".to_string(), response: tx }).await?;
6161
let res = rx.await?;
6262
```
6363

@@ -105,7 +105,7 @@ enum Request {
105105

106106
Since you already have an async boundary and a message passing based protocol, it seems like it would be easy to also use this protocol across a process boundary. But you still want to retain the ability to use it in-process with zero overhead.
107107

108-
To cross a process boundary, the commands have to be serializable. But the response or update channels are not. We need to separate the message itself and the update and response channels.
108+
To cross a process boundary, the requests have to be serializable. But the response or update channels are not. We need to separate the message itself and the update and response channels.
109109

110110
At this point things start to get quite verbose:
111111

0 commit comments

Comments
 (0)