Fun with Erlang (was Re: Stand Alone Erlang for Windows. yetagain)

Chris Pressey <>
Mon Mar 19 19:53:47 CET 2001


Ulf Wiger wrote:
> I've had a few ideas:
> - if code runs in another node, one might want to specialize the RPC
>   behaviour. Then, in fact making RPC a behaviour would be very handy.
>   One could perhaps specify at Erlang boot time via a kernel
>   environment variable which behaviour module to use for rpc.
>   When you think about it, lots more modules in OTP should really
>   be behaviours that could be specialized.

I totally agree.  In an ideal world, almost everything would be a
behaviour, and it would be just as easy to create a new behaviour as a
new module... they're very cool.

> - We've played around with different ways of taking care of really
>   hairy upgrade scenarios. One idea that came up (I think OTP is
>   still thinking about whether to cheer or throw eggs at us) was
>   to make it possible via the OTP R7B trace mechanism to reroute
>   a function call to another function (with same arity). For example
>   all calls to mnesia:write/1 could be rerouted to myMnesia:write/2;
>   a corresponding trap for message sending could be to call
>   M:F(Pid, Message) instead of sending the message. Dangerous stuff,
>   but it would be extremely flexible.

I thought about it over the weekend and I think I'll cheer, and save my
eggs for people who decide to abuse it.  I like it, it's probably worth
the danger.  Lying to the computer about what's going on is a long
standing tradition, after all...

> Have you read the thesis on OTP behaviours for simulations?
> I don't remember the URL, but it was posted on this list recently.

Yes, I've read most of it now.  It's a very good paper so the URL is
probably worth posting again.
  ftp://ftp.csd.uu.se/pub/papers/masters-theses/0178-ekstrom.pdf

_chris

-- 
"Ten short days ago all I could look forward to was a dead-end job as a
engineer.  Now I have a promising future and make really big Zorkmids."
Chris Pressey, Cat's Eye Technologies, http://www.catseye.mb.ca/
Esoteric Topics Mailing List: http://www.catseye.mb.ca/list.html



More information about the erlang-questions mailing list