Erlang filesystem

Chris Pressey cpressey@REDACTED
Fri May 9 18:18:20 CEST 2003

To expand on what I was saying last night while I was falling asleep:

On Tue, 6 May 2003 Ulf Wiger <etxuwig@REDACTED> wrote:
> - Do not use distributed erlang for your user interface.

That's essentially my rationale for disallowing the evaluation of
arbitrary Erlang functions from tellerl.  Of course one could go and
write a tellerl handler that allows it to be done, but that'd be silly.
'Eval Scheme'-type silly.

(Looking at it in the light of day, the Erlang side of tellerl needs to
be seriously rewritten, using a behaviour and maybe proplists -
hopefully next week.  The Perl side looks just dandy though.)

On Thu, 17 Apr 2003 Ulf Wiger <etxuwig@REDACTED> wrote:
> A common setup is to keep the same code on all nodes -- i.e.
> identical application trees. One very good reason for doing
> this is to avoid having different versions of the same
> module in the system.

This is one of the things that got me thinking about a replicated file

It would be interesting to know how people handle keeping their code in
synch across nodes - i.e., what's most popular - rpc:multicall(code,
load_binary, [Mod, Bin, File])?  rsync?  Manually copying the code over
when it changes?  Using the release handler somehow?

Also - this is embarrassing - but I am starting to suspect that for the
past two years I've had the wrong impression about the file server (i.e.
IoDevices that you get when you call file:open/2 without specifying
'raw'.)  I was operating under the assumption that it was trivial to
open a file on another node (because I swear I did it once, but my
memory might be playing tricks on me, because I've been banging my head
against the wall trying to do it again.)

It IS trivial to read an entire file from another node:

  > rpc:call(catbus@REDACTED, file, read_file, [".cshrc"]).

But when I try just opening it:

  > {ok,H} = rpc:call(catbus@REDACTED, file, open, [".cshrc",
  > rpc:call(catbus@REDACTED, file, read, [H, 100]).
  > file:format_error({error,terminated}).
  "unknown POSIX error"

Same result if I try merely file:read(H, 100).

I'm sure I could get around this by writing a file server process and
running it on catbus, but I thought that's why file_server_2 existed in
the first place!  (I like reinventing the wheel, but not THAT much :)


More information about the erlang-questions mailing list