spawning funs on other nodes that does not contain my module

Marcel Meyer <>
Tue Nov 30 19:36:14 CET 2010


Hi there,

Is it possible to spawn a function (which is pretty straight
forward, essentially a receive loop that grabs the message and
file:write_file's it to the file system) on another node, which does not
have a copy of my module?

I thought I would be able to make a fun that returns the mentioned fun above
and then spawn that message sink on another node.

I am investigating writing a file propagation system and it would be nice if
there is one process that gets notified of new files, which spawns a fun on
each recipient node, which tells that node how to handle it.

Any insights? Or should each node be running a file sink that just listens
for these {save, Data} msgs? I am trying to write something where I dont
have to manage the child nodes and their code. Perhaps a file sink
gen_server on each node that supports upgrades?

Regards,
Marcel


More information about the erlang-questions mailing list