Skip to content

Support PID alias in the send_msg effect - #653

Draft
dumbbell wants to merge 1 commit into
mainfrom
support-pid-alias-in-send_msg-effect
Draft

Support PID alias in the send_msg effect#653
dumbbell wants to merge 1 commit into
mainfrom
support-pid-alias-in-send_msg-effect

Conversation

@dumbbell

Copy link
Copy Markdown
Collaborator

This is the same as a PID except that the process who created its alias can decide if it is still interested in a reply or not. If the alias is deleted, the message won't reach the process mailbox.

However, it is not possible to query the PID or its node from an alias. In the context of Ra, it is impossible to implement the local option of the send_msg effect.

Because of this, the message is always sent from the leader.

@dumbbell

dumbbell commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator Author

I didn’t change the documentation. I wanted to discuss the idea and its implementation first.

I’m implementing a feature in Khepri to allow to send the result of a command to a specific process which may not be the caller (as part of the batching effort). I would like to be able to set a PID alias instead of a PID to make it resistant to log replay: the result should not be sent a second time to that designated process.

As noted in a couple comments in the code, it’s impossible to determine the PID or the node of a PID alias. Therefore, the local options can’t be honored.

This is the same as a PID except that the process who created its alias
can decide if it is still interested in a reply or not. If the alias is
deleted, the message won't reach the process mailbox.

However, it is not possible to query the PID or its node from an alias.
In the context of Ra, it is impossible to implement the `local` option
of the `send_msg` effect.

Because of this, the message is always sent from the leader.
@dumbbell
dumbbell force-pushed the support-pid-alias-in-send_msg-effect branch from b4af6af to 4d07f4d Compare August 27, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant