4 ms·
> Doors at the end of the day are a control transfer primitive. This is true, but isomorphic to RPC, so I really don't think I understand the distinction you'r
by ajross 2y ago
> Doors at the end of the day are a control transfer primitive.
This is true, but isomorphic to RPC, so I really don't think I understand the distinction you're trying to draw. A "procedure call" halts the "caller", passes "arguments" into the call, and "returns a value" when it completes. And that's what a door call does.
Nothing about "Remote Procedure Calls" requires thread pools or a recv() system call, or an idea of "waiting for a request". Those are all just implementation details of existing RPC mechanisms implemented without a send+recv call like doors.
Nor FWIW are doors alone in this space. Android Binder is effectively the same metaphor, just with a more opinionated idea of how the kernel should manage the discovery and dispatch layer (Solaris just gives you a descriptor you can call and lets userspace figure it out).
- klodolph 2y agoI thought the parent comment was drawing a very clear distinction—that doors do not involve message passing, but a different mechanism. If it were a message passing system, you would be able to save the message to disk and inspect it later, or transmit the message over the network, etc.
- ajross 2y agoIs this a pedantic argument about a specific definition for "message passing"? If not, then it's wrong: door_call() allows passing an arbitrary/opaque buffer of data into the call, and returning arbitrary data as part of the return. (Maybe the confusion stems from the fact that the sample code in the linked article skipped the second argument to door_call(), but you can see it documented in the man page). If so, then I retreat to the argument above: there is nothing about "Remote Procedure Call" as a metaphor that requires "message passing". That, again, is just an implementation detail of other RPC mechanisms that don't implement the call as directly as doors (or binder) do.
- klodolph 2y ago> Is this a pedantic argument about a specific definition for "message passing"? No. This is just colloquial usage of the term “message passing”. Yes, you can use doors to pass messages. That is not the only thing you can do. > If so, then I retreat to the argument above: there is nothing about "Remote Procedure Call" as a metaphor that requires "message passing". Yeah. Everyone else here agrees with that. The original comment you replied to said, “Doors at the end of the day aren't message passing based RPC.” This absolutely indicates that the poster agrees with you on that point—that not all forms of RPC are based on a message passing system. There are other forms of RPC, and this is one of them. Ultimately, I think you can conceive of “message passing” broadly enough that, well, everything is message passing. What is a CPU register but something that receives a message and later re-transmits it? I would rather think of the colloquial use of “message passing”. Likewise, you can probably dig into doors and find some message system somewhere in the implementation. Or at least, you’ll find something you can call a message.