[erlang-questions] rpc:call without being connected?

26 views
Skip to first unread message

Zabrane Mickael

unread,
Sep 10, 2012, 5:56:12 AM9/10/12
to Erlang Questions
Hi guys,

Is there any equivalent way (documented or not) to execute a remote function (like "rpc:call") but
without being connected to the remote node?

Regards,
Zabrane

_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

Vlad Dumitrescu

unread,
Sep 10, 2012, 6:12:40 AM9/10/12
to Zabrane Mickael, Erlang Questions
Hi,

On Mon, Sep 10, 2012 at 11:56 AM, Zabrane Mickael <zabr...@gmail.com> wrote:
> Is there any equivalent way (documented or not) to execute a remote function (like "rpc:call") but
> without being connected to the remote node?

Well, if you're not connected (somehow) to that node, how would you
let it know it has to execute something? So the question becomes, what
kind of alternative connections can there be?

One is a "communication conduit" (i.e. a tcp socket, a unix pipe, even
a file) that both parts can use to communicate. This is basically the
same as having a connection via distribution, except you have to do it
from scratch. Both parts need to have supporting code for this.

Another option that i can think of and that doesn't require the other
node to be aware of us, is to start an erl shell to it (with
-remshell) and feed it the code to be executed. This only works for
things that can be serialized to source code, though.

I can't come up with others.

regards,
Vlad

Attila Rajmund Nohl

unread,
Sep 10, 2012, 6:23:57 AM9/10/12
to Zabrane Mickael, Erlang Questions
2012/9/10 Zabrane Mickael <zabr...@gmail.com>:
> Hi guys,
>
> Is there any equivalent way (documented or not) to execute a remote function (like "rpc:call") but
> without being connected to the remote node?

You could start an ssh daemon on the server side, then use
ssh_connection:exec/4 on the client side...

Zabrane Mickael

unread,
Sep 10, 2012, 8:21:25 AM9/10/12
to Erlang Questions
Motiejus, Vlad, Attila, and Thomas ... thanks for the feedbacks/links.

Regards,
Zabrane


On Sep 10, 2012, at 1:36 PM, Thomas wrote:

> Hi Zabrane,
>
> I wrote this for this purpose a little while back:
> https://github.com/thomasc/sslrpc
>
> Regards,
> Thomas
Reply all
Reply to author
Forward
0 new messages