Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a helper to execute an anonymous function remotely #16

Open
dumbbell opened this issue Nov 8, 2023 · 0 comments
Open

Add a helper to execute an anonymous function remotely #16

dumbbell opened this issue Nov 8, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@dumbbell
Copy link
Member

dumbbell commented Nov 8, 2023

It's possible to use erpc:call/2 or erpc:multicall/2 to execute an anonymous function remotely. However, it relies on the fact that the module is available on the remote node.

It would be nice to cover the use case where the remote node does not have the module where the anonymous function is defined. Horus could extract the function and load it on the remote node.

The API could look like:

-spec exec(Node | Nodes, StandaloneFun, Args) -> Ret when
      Node :: node(),
      Nodes :: [node()],
      StandaloneFun :: horus_fun(),
      Args :: [any()]).

Or remote_exec/3 or rpc/3 if exec/3 is too confusing vs. exec/2.

@dumbbell dumbbell added the enhancement New feature or request label Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant