The RPC implementation currently checks if the worker belongs to a shard assigned to the current worker executor and based on that either directly invokes it, or goes through the worker gateway.
For ephemeral workers we can always do the direct invocation. So the RPC call needs to check the cached component metadata to know if the target component is ephemeral or not.
The RPC implementation currently checks if the worker belongs to a shard assigned to the current worker executor and based on that either directly invokes it, or goes through the worker gateway.
For ephemeral workers we can always do the direct invocation. So the RPC call needs to check the cached component metadata to know if the target component is ephemeral or not.