refactor: remove proxy_id concept entirely
Not really needed and just adds extra fluff.
This commit is contained in:
parent
e32dc6e9b8
commit
bf45b592ac
4 changed files with 6 additions and 37 deletions
|
|
@ -171,14 +171,10 @@ The defined message types are:
|
|||
| `"send_named"` | both | `from_id: u64`, `to_name: text`, `payload: cbor` | Deliver to a well-known actor by name |
|
||||
| `"link"` | both | `local_id: u64`, `remote_id: u64` | Establish a link between a local actor and a remote actor |
|
||||
| `"exit"` | both | `id: u64`, `reason: text` | Remote actor `id` has exited with reason |
|
||||
| `"proxy_id"` | both | `name: text`, `id: u64` | Response to `send_named`: here is the opaque ID for this named actor |
|
||||
| `"transport_error"` | both | `reason: text` | Signal that the sending side is tearing down |
|
||||
|
||||
The `from_id` and `to_id` fields are opaque 64-bit integers assigned by the
|
||||
_home system_ of the actor. ID `0` is reserved and invalid. Named lookups
|
||||
(`send_named`) trigger the remote side to create or locate a proxy for the
|
||||
named actor and reply with its assigned ID via `proxy_id`, after which the
|
||||
sender can use the ID directly.
|
||||
_home system_ of the actor. ID `0` is reserved and invalid.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -288,15 +284,9 @@ const Proxy = struct {
|
|||
|
||||
### Lifecycle
|
||||
|
||||
A proxy is created by the endpoint in two situations:
|
||||
|
||||
1. **Inbound message with unknown `from_id`**: The endpoint receives a wire
|
||||
message from a remote actor ID it has not seen before. It spawns a proxy
|
||||
for that ID and records it in the proxy table before delivering the message
|
||||
locally.
|
||||
2. **Explicit lookup response (`proxy_id`)**: After a `send_named`
|
||||
exchange, the endpoint now knows the remote ID for a named actor and
|
||||
creates a proxy for it.
|
||||
A proxy is created by the endpoint when it receives a wire message from a
|
||||
remote actor ID it has not seen before. It spawns a proxy for that ID and
|
||||
records it in the proxy table before delivering the message locally.
|
||||
|
||||
A proxy is destroyed when:
|
||||
|
||||
|
|
@ -424,6 +414,3 @@ unique, which is sufficient for the 1:1 child process model.
|
|||
- **Backpressure**: The current model has no backpressure - a fast sender
|
||||
can overwhelm a slow transport. This is acceptable for the initial
|
||||
implementation but will need attention under load.
|
||||
- **Named actor re-registration**: If a well-known actor exits and is
|
||||
restarted under the same name, proxies on the remote side will hold stale
|
||||
IDs. A generation counter or re-lookup mechanism will be needed.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue