RPC functions needs to know the sender's node id #227
Replies: 3 comments 3 replies
-
Actually, it can be just a static function |
Beta Was this translation helpful? Give feedback.
-
I think this would be a valuable addition to the system |
Beta Was this translation helpful? Give feedback.
-
I agree that RPC functions should have a way of determining the ID of the node that called them. It would be nice if it could somehow be passed in to the RPC function as an argument, since at the point RPCManager invokes the RPC function it already knows the caller's ID (and |
Beta Was this translation helpful? Give feedback.
-
Sometimes, the RPC function needs to know who is the caller. In DDS, for example, the server needs to know the id of an external client who trying to register itself to some topic, so that the server can send a notification to it. However, RPC functions are unaware of who is the sender.
I plan to enable this feature by adding a thread-local static member in RPCManager to keep the caller id for both p2p calls and ordered calls. And this thread-local member will be exposed to the RPC functions through
GroupReference::group
: a mechanism similar to_Group::get_num_of_shards()
. I will implement this feature on a fork from theclient_callbacks
branch. Please let me know what do you think.Beta Was this translation helpful? Give feedback.
All reactions