[erlang-questions] Running an erl program on a remote machine
Mon May 23 17:13:24 CEST 2011
By "start an Erlang node on each machine" do you mean create a service which start an erl instance in detached mode, and that instance runs a program which creates a process that listens to the master machine?
I don't want to keep n terminals open (one of the master machine erl, one for each of the slave machines, etc).
----- Mail Original -----
De: "Carlo Bertoldi" <>
À: "Erlang" <>
Envoyé: Lundi 23 Mai 2011 17:01:35 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne
Objet: Re: [erlang-questions] Running an erl program on a remote machine
On 23/05/2011 16:52, wrote:
> I have been asked to write a script which runs database commands on one of n
> mirror machines. The name of the machine the commands should be run on is
> contained in a DNS alias called, say, THE_CURRENT_MACHINE. In other words,
> if the THE_CURRENT_MACHINE alias resolves to machineA.company.com,
> then the script should be run on that machine, if it resolves to
> machineB.company.com, it should run on machine b, etc.
> - write an Erlang script which will run as a daemon on machines A, B, C...
> which checks every second if the time matches the time at which the database
> commands should be triggered, and, if that is the case, run them.
You can start an Erlang node on each machine, and run on it a simple
process that waits for a start_your_db_ops.
Then on one machine you could run the master process, that resolves the
host and send the message to the appropriate node.
erlang-questions mailing list
More information about the erlang-questions