rpyc - how can I get a list of exposed functions of a connection
up vote
1
down vote
favorite
I have a small number of rpyc servers that only partially have the same exposed functions.
On the client events should be forwarded to all servers that have connected and are interested in the specific events.
I would like to get a list of available exposed functions on the servers from the servers connection object.
Best thing I found so far is checking in the client for an existing exposed function using the method name, e.g.
try:
conn.root.exposed_recordLog
except Exception as e:
print(f"recordLog is not exposed: {str(e)}")
which raises an AttributeError exception in the client - however - this raises also an exception on the remote server that I would like to avoid.
Thought about adding a general 'exposed_supportedFunctions' function on each server and return a list of its exposed functions but that looks like a bit of overkill and prone to mismatches.
python rpyc
add a comment |
up vote
1
down vote
favorite
I have a small number of rpyc servers that only partially have the same exposed functions.
On the client events should be forwarded to all servers that have connected and are interested in the specific events.
I would like to get a list of available exposed functions on the servers from the servers connection object.
Best thing I found so far is checking in the client for an existing exposed function using the method name, e.g.
try:
conn.root.exposed_recordLog
except Exception as e:
print(f"recordLog is not exposed: {str(e)}")
which raises an AttributeError exception in the client - however - this raises also an exception on the remote server that I would like to avoid.
Thought about adding a general 'exposed_supportedFunctions' function on each server and return a list of its exposed functions but that looks like a bit of overkill and prone to mismatches.
python rpyc
No solution? Maybe I switch to xmlrpc which provides such a function
– juerg
Nov 13 at 8:44
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have a small number of rpyc servers that only partially have the same exposed functions.
On the client events should be forwarded to all servers that have connected and are interested in the specific events.
I would like to get a list of available exposed functions on the servers from the servers connection object.
Best thing I found so far is checking in the client for an existing exposed function using the method name, e.g.
try:
conn.root.exposed_recordLog
except Exception as e:
print(f"recordLog is not exposed: {str(e)}")
which raises an AttributeError exception in the client - however - this raises also an exception on the remote server that I would like to avoid.
Thought about adding a general 'exposed_supportedFunctions' function on each server and return a list of its exposed functions but that looks like a bit of overkill and prone to mismatches.
python rpyc
I have a small number of rpyc servers that only partially have the same exposed functions.
On the client events should be forwarded to all servers that have connected and are interested in the specific events.
I would like to get a list of available exposed functions on the servers from the servers connection object.
Best thing I found so far is checking in the client for an existing exposed function using the method name, e.g.
try:
conn.root.exposed_recordLog
except Exception as e:
print(f"recordLog is not exposed: {str(e)}")
which raises an AttributeError exception in the client - however - this raises also an exception on the remote server that I would like to avoid.
Thought about adding a general 'exposed_supportedFunctions' function on each server and return a list of its exposed functions but that looks like a bit of overkill and prone to mismatches.
python rpyc
python rpyc
asked Nov 8 at 13:18
juerg
597
597
No solution? Maybe I switch to xmlrpc which provides such a function
– juerg
Nov 13 at 8:44
add a comment |
No solution? Maybe I switch to xmlrpc which provides such a function
– juerg
Nov 13 at 8:44
No solution? Maybe I switch to xmlrpc which provides such a function
– juerg
Nov 13 at 8:44
No solution? Maybe I switch to xmlrpc which provides such a function
– juerg
Nov 13 at 8:44
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53208579%2frpyc-how-can-i-get-a-list-of-exposed-functions-of-a-connection%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
No solution? Maybe I switch to xmlrpc which provides such a function
– juerg
Nov 13 at 8:44