Add a remote execution smart cell
josevalim opened this issue · comments
It receives the node name, the cookie, an optional variable to assign the result to, and the code to eval. :)
A few nice-to-haves related to this:
- adding another remote execution cell should copy the node/cookie from the previous one
- ability to store the result in a variable (e.g. like SQL cell)
As for implementation, is the thought that this would boil down to the following? (Simplified somewhat)
true = Node.set_cookie(System.fetch_env!("LB_DIST_COOKIE"))
true = Node.connect(:"some-node@some-addr")
result =
:erpc.call(:"some-node@some-addr", fn ->
...contents of cell editor...
end)
I think that’s pretty much it, yes!