[erlang-questions] On Starting A Remote Shell Programmatically
Sat Aug 21 23:38:58 CEST 2010
On 21 Aug 2010, at 21:49, 黃耀賢 (Yau-Hsien Huang) wrote:
> Hi, all. I want to write something like MapReduce on a set of nodes,
> based on Hewlett-Packard High Performance Computer. SSH is
> allowed that I can jump from one node to another without password,
> but RSH is not permitted to use.
> I have a question: give one another hostname, can I write Erlang
> program to start a remote shell or a remote job on it?
> Best Regards,
There is an ssh application distributed with OTP which should meet your needs. It'll allow you to open an SSH connection and send commands over it, so assuming you have installed the emulator on the remote machine, you should be able to spin up another node. If you're planning on writing a MapReduce framework, may I suggest that you look at riak_core (the underpinning framework behind riak), and luke (http://github.com/basho/luke) as these things have been done before. There is also some excellent stuff in scalaris (http://code.google.com/p/scalaris/) for coordinating work (paxos based IIRC) and the disco project (http://discoproject.org/) has implemented a MapReduce framework too, although jobs are written in python rather than Erlang.
More information about the erlang-questions