I want to use a python module that is accessible on a remote rpyc server only. Is there a difference between the following two ways of accessing modules on a remote machine:
""" on the client side: """
my_local_mod_ref = my_rpyc_connection.root.getmodule("remote_module_name")
my_local_mod_ref = my_rpyc_connection.root.a_func_returning_the_module_ref()
""" on the server side: """
def exposed_a_func_returning_the_module_ref()
import my_remote_module_name
return my_remote_module_name
If there is a difference, which of the two alternatives is cleaner or preferable?