Distributed Applications

hfventer hfventer@REDACTED
Mon Dec 2 08:58:04 CET 2002


Hi every one.

I have been searching for some answers on distributed applications, but
have not yet gotten it to work.

Here is what I want to do:
I have a simple TCP/IP server that creates a separate process for each
connection to the socket.  This process then receives commands from the
user.  These commands are passed on to a central server (possably
running on another node) and returns the response to the user.  The
central server has its own internal stat and recieves commands from
other processes.

Nothing realy fancy.
What I have achieved thusfar is to get my two nodes (windows XP and
Linux) to connect.  I can start everything on node 2 from node 1 (with a
spawn command)

I have two applications at the moment.  The TCP/IP server and the
command server.  They both have the application behavior. I created a
boot script on both nodes to start these two applications.

 [{kernel,"2.8.0"},
  {stdlib,"1.11.0"},
  {sasl, "1.9.4"},
  {erlyhack_app,"0.01.02"},
  {erlyhack_map_app,"0.01.01"}]

In my kernel.app file I added the following to both nodes.

  {distributed, [   {erlyhack_map_app, [n2@REDACTED, n1@REDACTED]} ]},
  {start_dist_ac, true},
  {sync_nodes_optional, [n2@REDACTED, n1@REDACTED]},
  {sync_nodes_timeout, 10000}

When I start the nodes up what I get is that all the applications start
on the node in question (erlyhack_app and erlyhack_map_app start on n1
and then on n2 and continue running there)  No takeover of
erlyhack_map_app to n2 happens.  Clearly I am missing something :)

Anyone know what I am doing wrong?

I have been searching for complete examples of distributed applications
but have not found any.  Are there any available for me to look at and
learn?

Thanks

-]-[einrich
PS This might be a duplicate message.  If it is, my appologies.




More information about the erlang-questions mailing list